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
https://forums.phpfreaks.com/topic/27175-mysql-help-needed-again/
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.