English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Getting this error "Parse error: syntax error, unexpected T_VARIABLE in /home/vasudhai/public_html/searchcontacts.php on line 22"
I am using this below given code:


OurHelp Hyd Search












$var = @$_GET['q'] ;
$trimmed = trim($var) //trim whitespace from the stored variable

// rows to return
$limit="10";

// check for an empty string and display a message.
if ($trimmed == "")
{
echo "

Please enter a search...

";
exit;
}

// check for a search parameter
if (!isset($var))
{
echo "

We dont seem to have a search parameter!

";
exit;
}

mysql_connect("localhost","user","pass

here i am unable to copy complete code...

2006-11-10 21:22:46 · 3 answers · asked by Anonymous in Computers & Internet Programming & Design

3 answers

i bet ur using PHP5???
if so read the following n visit the link below:
PHP4 (and below) has MySQL support included by default; the functions are embedded into the core of PHP. But PHP5 has removed embedded support for MySQL and requires MySQL to be loaded as an add-in module, in the same way you have to support anything else.

2006-11-10 21:40:03 · answer #1 · answered by Anonymous · 0 1

You are missing a semicolon at the and of this line:

$trimmed = trim($var)
Just insert the semicolon and execute the code





OurHelp Hyd Search












$var = @$_GET['q'] ;
$trimmed = trim($var); //trim whitespace from the stored variable

// rows to return
$limit="10";

// check for an empty string and display a message.
if ($trimmed == "")
{
echo "

Please enter a search...

";
exit;
}

// check for a search parameter
if (!isset($var))
{
echo "

We dont seem to have a search parameter!

";
exit;
}

2006-11-13 00:51:30 · answer #2 · answered by keshu 2 · 0 0

You are missing a semicolon at the and of this line:

$trimmed = trim($var)

It should be:

$trimmed = trim($var);

2006-11-11 04:35:00 · answer #3 · answered by NC 7 · 1 0

fedest.com, questions and answers