I have a form for letting a user edit their information, and i want to fill the forms with the value that i have stored in my database. But i cant seem set the default value correctly. This is a snippet of my code, i know i am on the database correctly from the var_dump. But the text box just shows <?php=$name[2];?>.
<?php
$id = $_REQUEST["id"];
$db_name="";//Database name
$tb_name=""; //table name
//connect to server and select database
mysql_connect('')or die(mysql_error());
mysql_select_db("$db_name")or die(mysql_error());
$sql = "SELECT * FROM $tb_name WHERE CUST_ID = '$id'";
$result=mysql_query($sql);
$name=mysql_fetch_array($result);
var_dump($name);
?>
<p>First Name: <input name="custFirstname" id="custFirstname"
size="20" text="" value="<?php=$name[2];?>" type="text">