Jump to content

redking

Members
  • Posts

    21
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

redking's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. no, don't use a cron use the time thing find out how much time has passed and update accordingly. You could create a function that, anythime gold is accessed it would be updated.
  2. Yeah, I would serialize an array and store it in the database. then when you unserialize it use $array[] to add new ones.
  3. $query = "SELECT * FROM ads WHERE category = 'Drivers' AND validation = 0 ORDER BY '$price' $limit"; should be $query = "SELECT * FROM ads WHERE category = 'Drivers' AND validation = 0 ORDER BY price DESC $limit"; where price is the name of your price field in the database DESC = descending order ASC = Ascending order
  4. I only know about zend, but the zend PHP 5 debugger can't do database code, which makes it really annoying
  5. could you try running this and tell me if it runs correctly? (just give a known value to the variables) <?php $_POST['User_Name'] = "foo"; $Login['User_ID'] = 123; $Login['Login_ID'] = 123; $User_Name = $_POST['User_Name']; $User_ID = $Login['User_ID']; $Login_ID = $Login['Login_ID']; setcookie("User_Name", $User_Name, strtotime('+ 30 minutes')); setcookie("Login_ID", $Login_ID, strtotime('+ 30 minutes')); setcookie("User_ID", $User_ID, strtotime('+ 30 minutes')); ?>
  6. I think the problem is that the $user object is a global variable and cannot be accessed from within the function. try either function doCommision() { global $user; if ($user->jv == 'y') { define( "AFFILIATE_COMMISSION", 20 ); } else { define( "AFFILIATE_COMMISSION", 10 ); } } or function doCommision($user) { if ($user->jv == 'y') { define( "AFFILIATE_COMMISSION", 20 ); } else { define( "AFFILIATE_COMMISSION", 10 ); } }
  7. session_cache_expire(5); put this before session_start();
  8. $booked should probably be an array like this $booked[$month] = array($booked_day1 , $booked_day2 , $booked_day3 ); if (in_array($day , $booked[$month])) //do highlighting and outputting here
  9. You probably included the same file more than once by accident, use include_once or require_once wherever you included the function.php file. or make sure it is only included once, it may be inside of a loop or somthing.
  10. Did you try echoing $_POST['STREET1']? if so, did it have the correct value?
  11. $result = $client->call('ConvertTemperature', $param); echo "The message is: " . $result['ConvertTemperatureResult'];
  12. is the STREET1 column in the database set to varchar?
  13. I disagree with patrick, querying 10,000 rows and adding them seems to be a lot of unnecessary processing, especially if you plan on having alot of users. I would go with option number 2 and only query the 10,000 row table to check if people have voted before.
  14. What that means is that you are defining the function tab() twice. this file has the function tab() C:\Program Files\xampp\htdocs\functions.php so does this one C:\Program Files\xampp\htdocs\parser\functions.php delete the function in one or the other or don't include one of the files
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.