Page 2 of 2

Posted: Sun May 28, 2006 3:21 pm
by franknu

Code: Select all

<html>


<head>
  <title>Hello!</title>
</head>

<body>



<?

$username="localhost";
$password="abc123";
$database="contacts";

$db = mysql_connect("localhost", $username,$password);
mysql_select_db("contacts",$db);
$result = mysql_query("SELECT * FROM `First Name:` WHERE `Position:`",$db) or die(mysql_error());

  $myvar= "Hello World";
printf("$myvar");


printf("Position: %s<br>\n", mysql_result($result,0,"Position:"));



?>

</body>
</html>
this is the messege that i am getting
Hello World
Warning: Unable to jump to row 0 on MySQL result index 2 in /home/httpd/vhosts/mass-ad.com/httpdocs/test11.php on line 28
Position

i have data in the database contacts table First Name: i want to display what is inside the colum Position:

thank u finallly i go the php tags stuff thanks for the patiente