Jump to content

update user form submit


droidus

Recommended Posts

i am trying to validate a form, but for some reason, my form tags must not be right, because when i click on submit, it does nothing.  here is my code:

 

    <?php
if (isset($_POST['submit'])) {
	echo "good!";
}
?>
    
    <?php	
mysql_select_db($database_uploader, $uploader);    
    $query = "SELECT * FROM members WHERE id='" . mysql_real_escape_string($id) . "'";
    $result = mysql_query($query) or die(mysql_error());

if (mysql_num_rows($result) > 0) {
	$row = mysql_fetch_array($result) or die(mysql_error());
	echo "<p>You are working on " . ucfirst($row['name']) . "'s profile.";

	echo "<form action='' method='post' id='edit_user' name='edit_user' ><p>ID: <input name='id' type='text' value='$row[id]' disabled='disabled' style='width:1.25em;' />";
	echo "<p>Name: <input name='name' type='text' value='$row[name]' />";
	echo "<p>Username: <input name='username' type='text' value='$row[uname]' />";
	echo "<p>Password: <input name='password' type='text' value='N/A' disabled='disabled' style='width:1.75em;' />";
	echo "<p>E-mail Address: <input name='emailAddress' type='text' value='$row[email]' />";
	echo "<p>Account Activation: <input name='acntActivation' type='text' value='$row[activated]' style='width:.75em;' /> Valid Value: 0, 1.";
	echo "<p>Account Type: <input name='accountType' type='text' value='$row[acntType]' style='width:.75em;' /> Valid Value: 0, 1,2,3.";
	echo "<p>Account Status: <input name='accountStatus' type='text' value='$row[acntStatus]' style='width:.75em;' /> Valid Value: 0, 1.";
	echo "<p>Bandwhitch Used: <input name='bandwhitch' type='text' value='$row[bandwhitch]' style='width:2em;' />";
	echo "<p>Notes: <textarea name='id' type='notes'>$row[notes]</textarea>";
	echo "<p><input name='submit' value='Update User Profile' id = 'submit' type='button' /></form>";
}
?>

 

(sorry about all the echos... was late at night, and didn't think to combine 'em :P )

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

echo "<form action='' method='post' id='edit_user' name='edit_user' ><p>ID: <input name='id' type='text' value='$row[id]' disabled='disabled' style='width:1.25em;' />";
	echo "<p>Name: <input name='name' type='text' value='".$row['name']."' />";
	echo "<p>Username: <input name='username' type='text' value='".$row['uname']."' />";
	echo "<p>Password: <input name='password' type='text' value='N/A' disabled='disabled' style='width:1.75em;' />";
	echo "<p>E-mail Address: <input name='emailAddress' type='text' value='".$row['email']."' />";
	echo "<p>Account Activation: <input name='acntActivation' type='text' value='".$row['activated']."' style='width:.75em;' /> Valid Value: 0, 1.";
	echo "<p>Account Type: <input name='accountType' type='text' value='".$row['acntType']."' style='width:.75em;' /> Valid Value: 0, 1,2,3.";
	echo "<p>Account Status: <input name='accountStatus' type='text' value='".$row['acntStatus']."' style='width:.75em;' /> Valid Value: 0, 1.";
	echo "<p>Bandwhitch Used: <input name='bandwhitch' type='text' value='".$row['bandwhitch']."' style='width:2em;' />";
	echo "<p>Notes: <textarea name='id' type='notes'>".$row['notes']."</textarea>";
	echo "<p><input type='submit' value='Update User Profile' id = 'submit' name='submit' /></form>";

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.