RE: [PHP-DB] Code to send user info to database
I have a website that is hosted by Yahoo! Web Hosting which supports PHP with MySQL. The db is already created, so there's no problem there. The problem I am having is knowing what code to write for my form entries so that the info entered by a user can be sent to my db named users and then later when a zip code search is conducted, the matching info can be retrieved and displayed on a results page. Someone else created the db for me so I don't really know much about that side of it. I've been reading up on how to write PHP, but I am still lost as to where to start for my forms. Is there any other info you need to know? Hutchins, Richard [EMAIL PROTECTED] wrote: Michelle, You said you've tried tutorial after tutorial. What specific problems are you having? What kind of database are you using? Have you architected the db yet? We can't help much if we don't know what specific problems you're having (e.g. db connection problems, PHP parse errors, unexpected results, etc., etc.). Rich -Original Message- From: Michelle Whelan [mailto:[EMAIL PROTECTED] Sent: Friday, February 28, 2003 2:09 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Code to send user info to database Hi all, I'm just starting out with writing PHP and would like to get help with writing the code for my forms to have the data sent to a database. Here is one of my forms: if ($submit == Submit){ echo Your listing has been submitted; echo Go back Home ; echo www.dirtjobs.com/havedirt.phpAdd another listing; } else{ echo ' size=2 color=#FFWHAT TYPE OF DIRT? CLEAN DIRT FOR FINISH GRADINGDIRT WITH 6 MINUS ROCKSDIRT WITH ROCKS size=2 color=#FFAPPROXIMATE QUANTITY OF DIRT IN YARDS: [input] name=noyardsYards size=2 color=red*MANDATORY* size=2 color=#FFCONTACT NAME: [input] size=2 color=#FFCONTACT PHONE NUMBER: [input] [input] size=2 color=#FF - [input] maxlength=4 name=suffix size=2 color=#FFZIP CODE: [input] (Jobs are sorted by zip code to find other jobs in the area) size=2 color=#FFJOB EXPIRATION DATE: [input] (If no date is listed, jobs will be removed in 60 days.) size=2 color=blue(*Optional)/font size=2 color=#FFEMAIL ADDRESS: [input] size=2 color=#FFCITY OF JOB LOCATION: [input] size=2 color=#FFJOB CROSS STREETS: [input] size=2 color=#FFJOB EXPIRATION DATE: [input] (If no date is listed, jobs will be removed in 60 days.) [input] value=Submit [input] I imagine the code is probably somewhat simple, but I have read tutorial after tutorial etc. and am getting nowhere for the past two weeks. This is also the first time I have ever posted to a mailing list so I apologize if my request is incorrect in format. Thanks so much, Michelle -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Code to send user info to database
I have a website that is hosted by Yahoo! Web Hosting which supports PHP with MySQL. The db is already created, so there's no problem there. The problem I am having is knowing what code to write for my form entries so that the info entered by a user can be sent to my db named users and then later when a zip code search is conducted, the matching info can be retrieved and displayed on a results page. Someone else created the db for me so I don't really know much about that side of it. I've been reading up on how to write PHP, but I am still lost as to where to start for my forms. Is there any other info you need to know? Hutchins, Richard [EMAIL PROTECTED] wrote: Michelle, You said you've tried tutorial after tutorial. What specific problems are you having? What kind of database are you using? Have you architected the db yet? We can't help much if we don't know what specific problems you're having (e.g. db connection problems, PHP parse errors, unexpected results, etc., etc.). Rich -Original Message- From: Michelle Whelan [mailto:[EMAIL PROTECTED] Sent: Friday, February 28, 2003 2:09 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Code to send user info to database Hi all, I'm just starting out with writing PHP and would like to get help with writing the code for my forms to have the data sent to a database. Here is one of my forms: if ($submit == Submit){ echo Your listing has been submitted; echo Go back Home ; echo www.dirtjobs.com/havedirt.phpAdd another listing; } else{ echo ' size=2 color=#FFWHAT TYPE OF DIRT? CLEAN DIRT FOR FINISH GRADINGDIRT WITH 6 MINUS ROCKSDIRT WITH ROCKS size=2 color=#FFAPPROXIMATE QUANTITY OF DIRT IN YARDS: [input] name=noyardsYards size=2 color=red*MANDATORY* size=2 color=#FFCONTACT NAME: [input] size=2 color=#FFCONTACT PHONE NUMBER: [input] [input] size=2 color=#FF - [input] maxlength=4 name=suffix size=2 color=#FFZIP CODE: [input] (Jobs are sorted by zip code to find other jobs in the area) size=2 color=#FFJOB EXPIRATION DATE: [input] (If no date is listed, jobs will be removed in 60 days.) size=2 color=blue(*Optional)/font size=2 color=#FFEMAIL ADDRESS: [input] size=2 color=#FFCITY OF JOB LOCATION: [input] size=2 color=#FFJOB CROSS STREETS: [input] size=2 color=#FFJOB EXPIRATION DATE: [input] (If no date is listed, jobs will be removed in 60 days.) [input] value=Submit [input] I imagine the code is probably somewhat simple, but I have read tutorial after tutorial etc. and am getting nowhere for the past two weeks. This is also the first time I have ever posted to a mailing list so I apologize if my request is incorrect in format. Thanks so much, Michelle -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php