Jump to content

update form


yddib

Recommended Posts

<?php

//start the session
session_start();

$id = $_SESSION['id'];

mysql_connect("", "", "") or die(mysql_error());
//connects to the  server
mysql_select_db("");
//selects the database 

echo "Connection Open<br>";

$result = mysql_query("UPDATE gradinfo SET f_name='$f_name', l_name='$l_name', gender='$gender', birthd='$birthd', birthm='$birthm', birthy='$birthy', email='$email', pass='$pass', address1='$address1', county='$county', country='$country', telephone='$telephone', relationship='$relationship', location='$location', about_me='$about' WHERE u_id='$id'") or die (mysql_error());

if (!$result) {
exit('<p>Error performing query: ' . mysql_error() . '</p>');
}

echo "Record Updated<br>";

?>

 

Hi i'm have a bit of a problem updating my form. I am grabbing varaibles from another form at the top of this form but i can't get it to update the database. I was wondering if anyone could see if there is a problem?

Thanks

Link to comment
https://forums.phpfreaks.com/topic/123422-update-form/
Share on other sites

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.