Jump to content

Update script gives error please help


wgoldschagg

Recommended Posts

done - YOU ARE A GENUIS - IT WORKS!!!! thanks.

 

Didnt realise that PHP was SO Case Sensative.

 

Thank you all very much for your help.

 

BTW. I Am developing my own website and I am A newbie ( VERY) thats why all the "stupid" errors. thanks again.

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>

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.

 

 

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

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 

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.