Jump to content

php and sql script windows/linux


adzie

Recommended Posts

joy I have the form displaying the user data

 

 

<?

 

$vid=$_GET['VID'];

 

include("db.php");

$query="SELECT * FROM members WHERE vid='$vid'";

$result=mysql_query($query);

$num=mysql_num_rows($result);

 

 

$i=0;

while ($i < $num) {

$vid=mysql_result($result,$i,"vid");

$name=mysql_result($result,$i,"name");

$password=mysql_result($result,$i,"password");

 

?>

<b><font color="#000080" face="Verdana">Update Script

Form</font></b>

<form action="updated.php">

<p>VID:                    

<input type="text" name="VID" value="<? echo "$vid"?>"?><br>

Name:                 

<input type="text" name="NAME" value="<? echo "$name"?>"?><br>

PASSWORD:        

<input type="text" name="PASSWORD" value="<? echo "$password"?>"?><br>

<input type="Submit" value="Update">

</p>

</form>

 

<?

++$i;

}

 

mysql_close();

?>

 

using the url up.php?VID=<user vid)  i now get the details to appear on the screen as it did on the linux/unix but it wont update the db with this script i was using before, any ideas?

 

 

<?

$username="";

$password="";

$database="";

mysql_connect(localhost,$username,$password);

 

$query="UPDATE members SET vid='$vid', name='$name', password='$password' WHERE vid='$vid'";

 

@mysql_select_db($database) or die( "Unable to select database");

mysql_query($query);

echo "Record Updated";

 

mysql_close();

 

 

?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.