Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
When I use "Select *" in the code below I am not able to access all fields. If I use "Select Name" or "Select Address" I'm able to access those. Here is my code.Code: Select all
<?php
$test = $_REQUEST['ID'];
$conn=mysql_connect("127.0.0.1", "odbc", "") ;
mysql_select_db("php000",$conn);
$sql = "Select name from mystudent where sid=$test";
$result = mysql_query($sql,$conn) or die("Error".mysql_error());
while ($array = mysql_fetch_array($result)) {
print $array['name'];
}
?>Jcart | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]