RE: Code to send user info to database

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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" <Richard.Hutchins@Getingeusa.com> 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:webmaster@dirtjobs.com]
> Sent: Friday, February 28, 2003 2:09 PM
> To: php-db@lists.php.net
> Subject:  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.php>Add 
> another listing";
> } 
> else{ 
> echo ' 
> 
> 
> 
> 
> 
> 
> 
> < 
> 
> > size="2" color="#FFFFFF">WHAT TYPE OF DIRT?
> 
> > CLEAN DIRT FOR FINISH GRADING>DIRT WITH 6" MINUS ROCKS>DIRT WITH ROCKS>
> 
> 
> 
> > size="2" color="#FFFFFF">APPROXIMATE QUANTITY OF DIRT IN YARDS:
>  [input] > name="noyards">Yards
> 
> 
> < 
> 
> > size="2" color="red">*MANDATORY*
> 
> 
> > size="2" color="#FFFFFF">CONTACT NAME:
>  [input] 
> 
> 
> > size="2" color="#FFFFFF">CONTACT PHONE NUMBER:
>  [input]  
>  [input]  
> > size="2" color="#FFFFFF"> -  [input] > maxlength="4" name="suffix">
> 
> 
> > size="2" color="#FFFFFF">ZIP CODE:
>  [input] 
> 

> (Jobs are sorted by zip code to find other jobs in the 
> area)
> 
> 
> > size="2" color="#FFFFFF">JOB EXPIRATION DATE: 
>  [input] 
> 

> (If no date is listed, jobs will be removed in 60 
> days.)
> 
> 
>  
> 
> > size="2" color="blue">(*Optional)/font>
> 
> 
> > size="2" color="#FFFFFF">EMAIL ADDRESS:
>  [input] 
> 
> 
> > size="2" color="#FFFFFF">CITY OF JOB LOCATION:
>  [input] 
> 
> 
> > size="2" color="#FFFFFF">JOB CROSS STREETS:
>  [input] 
> 
> 
> > size="2" color="#FFFFFF">JOB 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

[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux