I need to send some hidden data to a database when a certain part of a form is filed out can this be done if so how.The hidden part will go to a different field on the database. Thanks in advance.
What is your question? Seems now like you are asking how to retrieve posted data, insert it into the database depending on the conditional statement.
Are you hand-coding your PHP, or using something like Dreamweaver? I remember a friend of mine asking for some help a while back trying to do this (using Dreamweaver). It's another example of why I don't particularly like RADs. After beating our heads against the wall for about a month, I finally found one paragraph in a book that mentioned it can't be done. So I hand-coded it for her and sent her the solution. It would have been a lot faster if I'd just done it from the start, but I would have missed out on that delightful learning experience. So, does that help?
What i'm trying to do is send a bit of additional data (one word) when a certain part of a form is filled out this extra bit of data will be hidden from the user , this data will be the same for every user and will neesd to be placed in a different place on the database to the data that the user filed out. Yes i will be hand-coding. It helps a little now i know it can be done, but if you told me how would help a lot
<form method="post" action="page_name.php"> <input type="hidden" name="hidden_text" value="what ever"> <input type="text" name="full_name"> <input type="submit" value="Send"> then grab the var <? $hidden_text = $_POST["hidden_text"]; $full_name = $_POST["full_name"]; Then just insert into your database "INSERT INTO tablename full_name, hidden_text VALUE ('".$full_name."','".$hidden_text."')";