|
|
 |
PHP and MySQL...... Again
date posted 12th September 2002 22:03
This is a multi-part message in MIME format.
------=_NextPart_000_0001_01C25AA7.BD3C5040
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
Hey, could some one have a look at the below code and tell me why it is
bringing back all this crap:-
Notice: Use of undefined constant location - assumed 'location' in
C:wwwrootppshowprops.php on line 26
Notice: Use of undefined constant price - assumed 'price' in
C:wwwrootppshowprops.php on line 26
Name:test
E-Mail:643848
Notice: Use of undefined constant location - assumed 'location' in
C:wwwrootppshowprops.php on line 26
Notice: Use of undefined constant price - assumed 'price' in
C:wwwrootppshowprops.php on line 26
Name:location
E-Mail:price
include("vars.php");
mysql_connect ("$db_host", "$db_username", "$db_password") or
die("Unable to connect to database");
@mysql_select_db("$db_name") or die("Unable to select database
$db_name");
$sqlquery = "SELECT * FROM properties";
$result = mysql_query($sqlquery);
while($row = mysql_fetch_array($result)) {
echo "Name:".
$row[location] ."E-Mail:". $row[price]. "";
}
if(mysql_num_rows($result)
Hey, could some one have a look at the below code and =
tell
me why it is bringing back all this crap:-
Notice: Use of undefined constant location - =
assumed
'location' in C:wwwrootppshowprops.php
on line 26
Notice: Use of =
undefined
constant price - assumed 'price' in C:wwwrootppshowprops.php
on line 26
Name:test
E-Mail:643848
Notice: =
Use of
undefined constant location - assumed 'location' in C:wwwrootppshowprops.php on line 26
Notice: Use of =
undefined
constant price - assumed 'price' in C:wwwrootppshowprops.php
on line 26
Name:location
E-Mail:price
include("vars.php");
mysql_connect ("$db_host", "$db_username",
"$db_password") or die("Unable
to connect to database");
mysql_select_db("$db_name") =
or
die("Unable to select database $db_name");
$sqlquery =3D =
"SELECT * FROM
properties";
$result =3D mysql_query($sqlquery);
while($row =3D mysql_fetch_array($result)) =
{
echo
"<font face=3Darial
size=3D-1><p><b>Name:</b>".
$row[location] =
."<br><b>E-Mail:</b>".
$row[price]. =
"</p>";
}
if(mysql_num_rows($result)<1){
echo
"<font face=3DArial =
size=3D+0><b>No
Results!</b></font><br>";
}
mysql_free_result($result);
------=_NextPart_000_0001_01C25AA7.BD3C5040--
|
 |
|