Server error! Error 500
Posted: Fri Jun 29, 2007 3:15 am
feyd | Please use
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Could anyone shed some light on this, I'm going to be posting a textarea back to an SQL update to a MS SQL DB. I'm falling at this hurdel though.
The textare is populated from a text field in the database, and im attempting to call the same page when the user submits. When i try and submit using "post" i get this server 500 error, but when i use "get" it works with the string concatenated onto the url. Does anyone have any ideas?Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>First Edit Attempt</title>
</head>
<body>
<p>
<?php include('dbconn.inc.php'); ?>
</p>
<p> </p>
<?php
$query = "select * from projects where projectid = 1";
$result = mssql_query($query);
$numRows = mssql_num_rows($result);
while ($row = mssql_fetch_array($result))
{
$projectdescription = $row["projectdescription"];
?>
<form id="myForm" name="myForm" method="get" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<label>Project Description
<textarea name="textarea" cols="50" rows="10"><?php echo $projectdescription?></textarea>
</label>
<p>
<label>
<input type="submit" name="Submit" value="Submit Changes" />
</label>
</p>
<p> </p>
</form>
<?php
}
?>
<p> </p>
<?php
mssql_close($dbhandle);
?>
</body>
</html>feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]