Variables Not Working -- Help?
Posted: Fri Jan 22, 2010 9:21 am
Hi all, I have a kind of mysterious problem, I hope you all can help me. Here's the PHP file I am loading in the browser:
Notice: Undefined variable: displaytitles in custom-store.php on line 12
Notice: Undefined variable: displaypage in custom-store.php on line 12
Notice: Undefined variable: searchstring in custom-store.php on line 12
Notice: Undefined variable: displaytitles in custom-store.php on line 13
Notice: Undefined variable: displaypage in custom-store.php on line 13
Notice: Undefined variable: searchstring in custom-store.php on line 13
I get these errors when loading the page, and the arguments do not seem to be passed on to the functions, yet if I replace the variables in the function argument with plain numbers, the functions work exactly as expected.
What the heck is going on?
Code: Select all
<?php
error_reporting(E_ALL);
ini_set("display_errors", 1);
include 'cart-functions.php';
$displaytitles = 40;
$displaypage = 1;
$searchstring = "";
print writeShoppingCartJ();
drawstore_pageline_search($displaytitles, $displaypage, $searchstring);
drawstore_horiz_searchC($displaytitles, $displaypage, $searchstring);
?>Notice: Undefined variable: displaypage in custom-store.php on line 12
Notice: Undefined variable: searchstring in custom-store.php on line 12
Notice: Undefined variable: displaytitles in custom-store.php on line 13
Notice: Undefined variable: displaypage in custom-store.php on line 13
Notice: Undefined variable: searchstring in custom-store.php on line 13
I get these errors when loading the page, and the arguments do not seem to be passed on to the functions, yet if I replace the variables in the function argument with plain numbers, the functions work exactly as expected.
What the heck is going on?