You seem to be mixing OO and procedural coding styles...try
<?
mysql_connect("localhost",<user>,<password>);
$result=mysql_db_query("salzert","SELECT * FROM Benutzer WHERE ID=$id");
$row = mysql_fetch_array($result); //get the data into an array
echo '<input type="text" name=id value="';
echo $id;
echo '">';
echo "<tr>";
echo " <td>Vorname</td>";
echo '<td><input type="text" name="vorname" value="';
echo $row['Vorname'];
echo '"></td>';
echo "</tr>";
echo "<tr>";
echo " <td>Name</td>";
echo '<td><input type="text" name="name" value=".$row['Name']."></td>';
echo "</tr>";
...
?>
bastien
From: Ruprecht Helms <rhelms@xxxxxxxxxx>
Reply-To: rhelms@xxxxxxxxxx
To: php-db@xxxxxxxxxxxxx
Subject: Scriptproblem
Date: Tue, 24 Jan 2006 16:12:53 +0100
Hi,
how can I display the stored data of an user as value in a formfield.
Actualy the formfield "vorname" shows no entry and the formfield "name"
shows .$row->Name.
What is the correct syntax in this case.
Regards,
Ruprecht
<?
mysql_connect("localhost",<user>,<password>);
$result=mysql_db_query("salzert","SELECT * FROM Benutzer WHERE ID=$id");
echo '<input type="text" name=id value="';
echo $id;
echo '">';
echo "<tr>";
echo " <td>Vorname</td>";
echo '<td><input type="text" name="vorname" value="';
echo $row->Vorname;
echo '"></td>';
echo "</tr>";
echo "<tr>";
echo " <td>Name</td>";
echo '<td><input type="text" name="name" value=".$row->Name."></td>';
echo "</tr>";
...
?>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php