Jump to content

mysql help needed (again)


marcus

Recommended Posts

ok, just some mysql updating a row help needed

[code=php:0]
if($act == edit)
{
$q = "SELECT * FROM `shoutbox` WHERE `id`=$id";
$query = mysql_query($q);
$shout = mysql_fetch_array($query);
echo"
<table border=0 cellspacing=0 cellpadding=1>
<tr><td>
<form action=shoutadmin.php method=post>Name:<td><input type=text name=mname value=$shout[name]>
<tr><td>
Website:<td><input type=text name=mwebsite value=$shout[website]>
<tr><td>
Message:<td><input type=text name=mmessage value=$shout[message]>
<input type=hidden name=messid value=$shout[id]>
<input type=hidden name=action value=doedit>
<tr><td colspan=2>
<input type=submit value='Edit'>
</table>
";
}
if($act == doedit)
{
$mname = $_POST[mname];
$mwebsite = $_POST[mwebsite];
$mmessage = $_POST[mmessage];
$messid = $_POST[messid];
$sqll = "UPDATE `shoutbox` SET `name` = '$name',
`website` = '$website',
`message` = '$message' WHERE `id` =$messid LIMIT 1 ";
$ress = mysql_query($sqll);
echo"Shout Edited";
}
[/code]

alright, the first part where it shows everything works, but when i update it, it doesnt work. it just stays the same, any ideas?
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.