Jump to content

Update script gives error please help


wgoldschagg

Recommended Posts

ANd to answer your question about


tags: They're responsible for that fancy boxes around the code in our posts. And you should use them as well. Like this

 

<------Search Page ( Working Correctly )------------->

<form action="search.php" method="post"> 
     Search By <select name="catag" id="catag">
            <option value="Name">Name</option>
</select>: <input type="text" name="term" /><br />
    <p> 
    <input type="submit" name="submit" value="Submit" /> 
    </form>

 

so that it becomes

<------Search Page ( Working Correctly )------------->

<form action="search.php" method="post"> 
     Search By <select name="catag" id="catag">
            <option value="Name">Name</option>
</select>: <input type="text" name="term" /><br />
    <p> 
    <input type="submit" name="submit" value="Submit" /> 
    </form>

Link to comment
Share on other sites

Will do in future. Thank you all again. 

 

And to the moderator - I have no intention of giving up learning PHP.  I was just getting fedup of going through code looking for the error (3 days). It just seemed easier to drop the data from the table and insert the new data after. Anyway I see now what was wrong.

 

 

Link to comment
Share on other sites

some tips...

 

always have error_reporting on.

 

always add echo's or die() functions in your else statements for better troubleshooting, and so you know where you are in your code and where (if) it's breaking.

 

use an editor like Notepad++ when coding .. really helps with the syntax issues.

 

try to name your fields/buttons appropriately .. you'll find after a while and several hundred fields/buttons later that name="submit", name="submit2", name="submit3", etc., don't really mean anything .. try name="update_button", name="register_button", etc.

 

your casual reading now comes from php.net

Link to comment
Share on other sites

Will do in future. Thank you all again. 

 

And to the moderator - I have no intention of giving up learning PHP.  I was just getting fedup of going through code looking for the error (3 days). It just seemed easier to drop the data from the table and insert the new data after. Anyway I see now what was wrong.

 

 

I'm glad you stuck it out, and paid attention to and followed the advice in the replies.  Hopefully we can get you using the code tags from here on out as well.  ;D 

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.