I am having trouble with one of my forms and can not figure out what is going on.
Form is a multiple test boxes with a Save button that saves the information to a MySQL db.
Basicly what happens is that sometimes when when clicking on the Save button it does not do anything. It is like it is not posting. Seems kind of random as only a few of my site users have reported having the problem and I was not able to re-create it until tonight. When I was doing it I was changing text and hitting save, on the 5th save it stopped responding. Tried back/refresh and the form would not post again until I restarted my browser.
This is the code from my page and the function that actually displays the form is below.
<?php
require_once("include.php");
$error = "";
if( $editsite == "Save" )
{
#do something
}
else if( $editsite == "Cancel" )
{
do something else
}
else
{
display_edit_website();
}
?>
function display_edit_website()
{
global $pap_user_id;
if ( check_for_logged_in( "editaccount.html" ) )
{
$qrystr = get_member_site_qry( $pap_user_id );
$conn = db_connect();
$result = db_query( $qrystr );
if ( !$result )
echo db_error();
else
{
$data = mysql_fetch_object( $result );
?>
<center>
<h1>Edit Website</h1>
<form method=get action="mysite.html">
<table bgcolor="#4F81B8">
<tr>
<td colspan=2 bgcolor="#E4E0E0"><h3>Site Info
<a href="pagehelp.html">Help?</a></h3></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td><b>Intro:<br></b>
<textarea name="intro" cols="60" wrap="PHYSICAL" rows="4"><?php echo $data->intro; ?></textarea>
</td>
</tr>
<tr>
<td><b>Work History:<br></b>
<textarea name="work" cols="60" wrap="PHYSICAL" rows="4"><?php echo $data->workhistory; ?></textarea>
</td>
</tr>
<tr>
<td><b>Network Marketing Experience:<br></b>
<textarea name="netmarkexp" cols="60" wrap="PHYSICAL" rows="4"><?php echo $data->netmarkexp; ?></textarea>
</td>
</tr>
<tr>
<td><b>Family:<br></b>
<textarea name="family" cols="60" wrap="PHYSICAL" rows="4"><?php echo $data->family; ?></textarea>
</td>
</tr>
<tr>
<td><b>Personal Interests / Hobbies:<br></b>
<textarea name="pihobbies" cols="60" wrap="PHYSICAL" rows="4"><?php echo $data->pihobbies; ?></textarea>
</td>
</tr>
<tr>
<td><b>Goals:<br></b>
<textarea name="goals" cols="60" wrap="PHYSICAL" rows="4"><?php echo $data->goals; ?></textarea>
</td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td colspan=2 align=center>
<input type=submit name="editsite" value="Save">
<input type=submit name="editsite" value="Cancel">
</td>
</tr>
</table></form>
</center>
<?php
} // else
} // if ( check for logged in )
}
if anybody has run into this before and has any ideas what is causing it I would really appreciate it.
Thanks,
greg