submitting form data into mysql

wxdqz

New Member
I'm using PHP/MySQL with redhat 7 apache
I have created a form that has 4 input variables ... email, icq#, do you run a server?, and last the tricky part a txt file upload for uploading a file trading list.

When the form is filled out and submitted the upload just shows the path in the database ... my ultimate goal here it to let users upload a txt file to my database. Then i would print that file out to a dynamic pade that is constantly updated .... the following is the code i use to upload my form data.

<body>
<?php
mysql_connect (localhost, root);
mysql_select_db (trade);
mysql_query ("INSERT INTO email_list (email, icq, runserver, tradelist)
VALUES ('$email', '$icq', '$runserver', '$tradelist')
");
print ($email);
print ("<p> ");
print ($icq);
print ("<p>");
print ($runserver);
print ("<p>");
print ($tradelist);
print ("<p>");
print ("Thanks for submitting.");
?>
</body>
 
Back
Top