Jump to content

Server Times Out? Help =(


vicodin

Recommended Posts

I just wrote this and when it tries to execute it just times out... Any ideas why?

This is my form:

 

<form action ="eupdate.php" method ="post" name="updateevents">
<table width="auto" cellpadding="2" cellspacing="2" border="0" id="startevents">
<tr>
<td class="eventtop">Pos.</td>
<td class="eventtop">Event Name</td>
<td class="eventtop">Event Link</td>
<td class="eventtop">Event Date</td>
</tr>
<tr>
<td class="event"><input type="text" name="enum[]" value="'.$row['num'].'" maxsize="1" size="5"></td>
<td class="event"><input type="text" name="event[]" value="'.$row['event'].'" size="25"></td>
<td class="event"><input type="text" name="elink[]" value="'.$row['link'].'" size="25"></td>
<td class="event"><input type="text" name="edate[]" value="'.$row['date'].'" size="10"></td>
</tr>
<tr>
<td class="event"><input type="text" name="enum[]" value="'.$row['num'].'" maxsize="1" size="5"></td>
<td class="event"><input type="text" name="event[]" value="'.$row['event'].'" size="25"></td>
<td class="event"><input type="text" name="elink[]" value="'.$row['link'].'" size="25"></td>
<td class="event"><input type="text" name="edate[]" value="'.$row['date'].'" size="10"></td>
</tr>
<tr>
<td class="event"><input type="text" name="enum[]" value="'.$row['num'].'" maxsize="1" size="5"></td>
<td class="event"><input type="text" name="event[]" value="'.$row['event'].'" size="25"></td>
<td class="event"><input type="text" name="elink[]" value="'.$row['link'].'" size="25"></td>
<td class="event"><input type="text" name="edate[]" value="'.$row['date'].'" size="10"></td>
</tr>
<tr>
<td class="event"><input type="text" name="enum[]" value="'.$row['num'].'" maxsize="1" size="5"></td>
<td class="event"><input type="text" name="event[]" value="'.$row['event'].'" size="25"></td>
<td class="event"><input type="text" name="elink[]" value="'.$row['link'].'" size="25"></td>
<td class="event"><input type="text" name="edate[]" value="'.$row['date'].'" size="10"></td>
</tr>
<tr>
<td class="event"><input type="text" name="enum[]" value="'.$row['num'].'" maxsize="1" size="5"></td>
<td class="event"><input type="text" name="event[]" value="'.$row['event'].'" size="25"></td>
<td class="event"><input type="text" name="elink[]" value="'.$row['link'].'" size="25"></td>
<td class="event"><input type="text" name="edate[]" value="'.$row['date'].'" size="10"></td>
</tr>

</table>
</form>

 

This is my script:

 

mysql_select_db("Mydb") or die(mysql_error());

for ($i = 0; $i = count($_POST['enum']); $i++) // Line 13
{  			
mysql_query("UPDATE events SET date = '{$_POST[edate][$i]}', event = '{$_POST[event][$i]}', link ='{$_POST[elink][$i]}',num = '{$_POST[enum][$i]} ' WHERE id = '$i'") or die (mysql_error());
																					}
              echo 'Events Have Been Updated. Check Front Page to make sure it looks ok.... To go back to editing page <a href=" panel3.php">Click Here</a>';

 

It errors out to:

Fatal error: Maximum execution time of 30 seconds exceeded in /home/mediapil/public_html/admin/eupdate.php on line 13

 

Thank you!

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.