Hi there, can anybody help me here please?
I am using AJAX for pagination in my application. So I am generating hyperlinks with for loop. as follow:
for($t=1; $t<=$hf; $t++)
{
if($t == $_GET['pageno'])
{
echo $t." ";
}
else
{
echo "<a id ='$t' href='javascript:void(0)' onclick='open_page('ajaxinfo....
Hi folks!
So, here's an example on Forrst, a CodeIgniter website:
http://forrst.com/posts/PHP_Nano_Framework_WIP_Just_throwing_some_ideas_o-mU8
Look at that nice URL. You've got the root site, then posts, then the post title and a short extract. This is pretty cool for user experience.
However, my CodeIgniter site's URLs just plain s...
Hi all,
I would like to configure apache php5 in a way that
.css and .js files will be inspected by php
their content type will remain as default (that is respectively "text/css" and "application/x-javascript")
I need this because both CSS and JS files are using global PHP vars. This allows me from a single PHP file to control both ...
Hi,
I'm getting single emails, for each undelivered address that mail() send couldn't reach.
Since this can be a painfull process, to keep copy pasting every single address, I'm wondering if it's possible to access a LOG or something ?
Some notes:
- I've got this app running on a GoDaddy server (I know it sucks);
Thanks for your atenti...
Hey all,
$url = mysql_real_escape_string($_POST['url']);
$shoutcast_url = mysql_real_escape_string($_POST['shoutcast_url']);
$site_name = mysql_real_escape_string($_POST['site_name']);
$site_subtitle = mysql_real_escape_string($_POST['site_subtitle']);
$email_suffix = mysql_real_escape_string($_POST['email_suffix']);
$logo_name = mysql_...
Currently using a HTML to PDF converter written in PHP to attach a printable readonly page to an email.
This can be a little temperamental at the best of times, producing strange results. I was wondering if there was perhaps a better option to achieve this end result?
(Granted the end PDF is not entirely "un-editable", but it does the...
<?php
$xml = simplexml_load_file('http://www.google.com/ig/api?weather=London');
$information = $xml->xpath("/xml_api_reply/weather/forecast_information");
$current = $xml->xpath("/xml_api_reply/weather/current_conditions");
$forecast_list = $xml->xpath("/xml_api_reply/weather/forecast_conditions");
?>
<html>
...
$a=array(array(1,0,0),array(1,0,0),array(1,0,0),array(1,0,0),array(1,0,0),array(1,0,0),array(1,0,0),array(1,0,0),array(1,0,0),array(1,0,0),array(1,0,0), array(1,0,0),array(1,0,0),array(1,0,0),array(1,0,0));
$rest=array(array(0,0,0),array(0,0,0),array(0,0,0),array(0,0,0),array(0,0,0),array(0,0,0),array(0,0,0),array(0,0,0),array(0,0,0),ar...
$_GET variable cannot identify the first array element.:
I have passed an array in url which looks like this
http://www.example.com/form.php?action=buy_now&ft=prf&Arrayproducts_id[]=431&products_id[]=432&Arraycart[]=1&cart[]=3&Arrayid[]=431&id[]=432
but when i print the array "products_id" and "cart" by...
I'm currently using the mysqli php extension.
Traditionally I have used mysqli_real_escape_string to escape user input. However I am looking at changing over the code (hopefully in as few steps as possible) to use prepared statements.
I want to be clear on this - provided I use prepared statements to bind all of my variables, can I be...
I have a series of web sites all hosted on the same server with different domains. I want to host some common PHP scrips and then be able to call these from the other domains.
Im am a bit fresh with my php so pls excuse code attempts - I have tried iterations of the following which may try and help you understand what I am aiming for!
...
Given this table design in a web application:
CREATE TABLE `invoice` (
`invoice_nr` int(10) unsigned NOT NULL AUTO_INCREMENT,
`revision` int(10) unsigned NOT NULL DEFAULT '1',
PRIMARY KEY (`invoice_nr`,`revision`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_spanish_ci
What's the most handy and reliable way to insert a new ...
Im trying to create 1 X 15 dimension unique array from 3 X 15 array. I am not able to achieve this .Please help me on this . Thanks in advance.
The 3 X 15 array was
Array[(1,2,3),(1,2,3),(1,2,3),(1,2,3),(1,2,3),(1,2,3),(1,2,3),(1,2,3),(1,2,3),(1,2,3),(1,2,3),(1,2,3),(1,2,3),(1,2,3),(1,2,3)]
...
How to echo a variable from the function? This is an example code.
function test() {
$foo = 'foo'; //the variable
}
test(); //executing the function
echo $foo; // no results in printing it out
...
Hi. Im using sessions for login systems in PHP. In all login examples, people directly uses "session_start()" function. But im confused about this.
=============================================
On localhost, I have that files;
http://localhost/app1/page1.php
http://localhost/app1/page2.php
http://localhost/app2/page2.php
==========...
Background:
entities tables currently has 14,111 records
articles table currently has 5211 records
I am trying to find all articles that are active (completed) and have the entity 'google'
# Finding articles that have the entity google takes:
# 4 ms
SELECT `Article`.`id` FROM `articles_entities` AS `ArticlesEntity`
LEFT JOIN `entities...
Hi all,
So this is my dilemma - I am using the excellent codeigniter-simpletest library by Eric Barnes (http://github.com/ericbarnes/codeigniter-simpletest). Its perfect for my purposes, as it adds an endpoint onto the test deployment of my CodeIgniter application, from which I have a dashboard to run all my unit tests and view the resu...
I have 3 tables in my MySQL database :
the Threads table (id, title)
the Tags table (id, name)
the pivot table ThreadTags (tagID, threadID)
Let's admit I already have the tag IDs in array $tagIDs, now I want to have all threads linked to ALL those tags. My current solution is something like that :
$stmt = 'SELECT id, title FROM Th...
I've finally remembered what to ask. I never really got what : and ? do when a variable is being defined like this:
$ip = ($_SERVER['HTTP_X_FORWARD_FOR']) ? $_SERVER['HTTP_X_FORWARD_FOR'] : $_SERVER['REMOTE_ADDR'];
As you can see there is ? and : and ( )
Could anyone give me a brief detail about why and how they are used for?
Thanks...
Hi all,
I have a function runAjax that functions correctly. Unfortunately I am struggling to return the value I get from the ajax query.
The ajax function assigns the returned value inside "contents" or "error" xml tags to the variable "result".
If I alert the result variable inside the ajax function it alerts the correct value (i....