|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today! |
|
#1
|
|||
|
|||
|
db connect and not posting
I am working on a redhat server. I am having trouble with sending data from a form to the database. As I am a code baby I think it is simple for someone else.
my form: <h4> <form method="post" action="resa.php" enctype="multipart/form-data" onSubmit="return checkit(this)"> <h4> E MAIL ADDRESS:<br><input type="text" Name="email" SIZE="50" STYLE="background:00bfff" VALUE="Your email is required" INPUT TITLE="your email"><br><br> NAME:<br><INPUT TYPE="TEXT" NAME="name" SIZE="50" WRAP="virtual" STYLE="background:00bfff" STYLE="color:000000" VALUE="YOUR NAME" INPUT TITLE="your name" ><br> Description:<br><INPUT TYPE="TEXT" NAME="description" SIZE="75" WRAP="virtual" STYLE="background:00bfff" STYLE="color:000000" VALUE="describe research" INPUT TITLE="topic of research" ><br> Keywords:<br><TEXTAREA NAME="keywords" COLS="67" ROWS="5" WRAP="virtual" STYLE="background:00bfff" STYLE="color:000000" VALUE="keywords" INPUT TITLE="keywords for the search"></textarea> <P> Research:<br><TEXTAREA NAME="research" COLS="67" ROWS="50" WRAP="virtual" STYLE="background:00bfff" STYLE="color:000000" VALUE="research" INPUT TITLE="paste your research here"></textarea> <P> <input type="submit"> </form> </h4> The external file resa.php is: <? mysql_connect (localhost); mysql_select_db (test); mysql_query ("INSERT INTO resa (name,email,description,keywords,research) values('$_get[name]','$_get[email]','$_get[description]','$_get[keywords]','$_get[research]') "); foreach($HTTP_POST_VARS as $keys=>$values){ ${$keys}=$values; echo "<p>Research from $name at $email was added to the database</p>"; ?> when submitted I receive the echo. I however do not get any data in the database. By command line select * from db shows empty. Can anyone help? thank you in advance. martindom |
|
#2
|
|||||
|
|||||
|
RE: db connect and not posting
see if this works...
php Code:
remember to replace 'mysql_user' and 'mysql_password' with your own username & password |
|
#3
|
|||
|
|||
|
RE: db connect and not posting
Thanks blindeddie! That worked. I really do appriciate the help. Is there a way to put line breaks in the text put in a text area? If not it will still work just makes it more confusing when the public has to read long strings without breaks. Thank you again. Martindom
|
|
#4
|
|||
|
|||
|
RE: db connect and not posting
in the textarea tag put thr following:
WRAP=VIRTUAL so it would look like <TEXTAREA WRAP=VIRTUAL> that should wrap the text in the textbox. |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Database Help > db connect and not posting |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|