Jump to content

"Update Email" form problem.. MySQL??


techiefreak05

Recommended Posts

Hi, Im trying to make a simple form where users can update their info.. right now tis super simple, just so i can understand it and advance it later... this code doesnt woprk.. although it doesnt produce any errors... it doesnt update thier email...

[code]<?php
if($_POST['submit1'])
{
$conn = mysql_connect("localhost", "zyco", "****") or die(mysql_error());
mysql_select_db('zyco_zycologin', $conn) or die(mysql_error());
$cNewEmail = $_POST['emailNew'];
$idg = $_SESSION['username'];
$query = "UPDATE `users` SET `email` = '$cNewEmail' WHERE `username` = $idg LIMIT 1 ";
mysql_query($query) or die('Error : ' . mysql_error() );
}
?>

<table align="center" border="0" cellspacing="0" cellpadding="3">
<tr><td ><font color=black>New Email:</font></td><td><input type="text" name="emailNew" maxlength="30"></td></tr>
<tr><td colspan="2" align="right"><input type="submit" name="submit1" value="Update"></td></tr>
</table>[/code]
What am i doing wrong..btw. the "***" in the password.. yes i really have my own password, like I said I dont get any DB errors.. or ANY errors at all.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.