Where have i gone wrong?

:stuck_out_tongue:

Somehow lost the thread.
My host provider will not assist in supporting me because i created my form in a third party app (dreamweaver cs4), the generic forms they provide the neophyte are so terribly bland. so i’ve gone it alone. i created a database using mysql, attempted to code good .php and worked hard at the html form. this is my first time but i know there must be some coding error attributable to me. Allow me to post my code. Thanks:

the html:

Parents Contact Information

Your First Name Your Last Name

Your Phone Number Your E-mail

 

Baby's Vitals

Baby's First Name Baby's Middle Name

Baby's Last Name

Baby's Birthdate Baby's Age

  </p>
  <p>
    <label for="babiesnmovies.com/baby">Baby's Height</label>
    <input type="text" name="babysheight" id="babiesnmovies.com/baby" />
    <label for="babiesnmovies.com/babyweight">Baby's Weight</label>
    <input type="text" name="babysweight" id="babiesnmovies.com/babyweight" />
  </p>
  <p>
    <label for="babiesnmovies.com/babyeyes">Baby's Eye Color</label>
    <input type="text" name="babyseyecolor" id="babiesnmovies.com/babyeyes" />
    <label for="babiesnmovies.com/babyhair">Baby's Hair Color</label>
    <input type="text" name="babyshaircolor" id="babiesnmovies.com/babyhair" />
  </p>
  <p>
    <label for="babiesnmovies.com/babyrace">Baby's Ethnicity</label>
    <input type="text" name="babysethnicity" id="babiesnmovies.com/babyrace" />
  </p>
  <p><input name="formsubmit" type="submit" value="Submit" />
</form>

the .php:

<?php # FileName="Connection_php_mysql.htm" # Type="MYSQL" # HTTP="true" $hostname_babiesnmoviesregistration = "db2573.perfora.net"; $database_babiesnmoviesregistration = "db337879506"; $username_babiesnmoviesregistration = "dbo337879506"; $password_babiesnmoviesregistration = "master00"; $babiesnmoviesregistration = mysql_pconnect($hostname_babiesnmoviesregistration, $username_babiesnmoviesregistration, $password_babiesnmoviesregistration) or trigger_error(mysql_error(),E_USER_ERROR);

$yourfirstname = $_POST [‘Your First Name’];
$yourlastname = $_POST [‘Your Last Name’];
$yourphonenumber = $_POST [‘Your Phone Number’];
$youremail = $_POST [‘Your E-Address’];
$babysfirstname = $_POST [‘Babys First Name’];
$babysmiddlename = $_POST [‘Babys Middle Name’];
$babyslastname = $_POST [‘Babys Last Name’];
$babysbirthdate = $_POST [‘Babys Birthdate’];
$babysage = $_POST [‘Babys Age’];
$babysheight = $_POST [‘Babys Height’];
$babysweight = $_POST [‘Babys Weight’];
$babyseyecolor = $_POST [‘Babys Eye Color’];
$babyshaircolor = $_POST [‘Babys Hair Color’];
$babysethnicity = $_POST [‘Babys Ethnicity’];

“insert_sql = INSERT INTO register (‘Your First Name’, ‘Your Last Name’, ‘Your Phone Number’, ‘Your E-mail Address’, ‘Baby’s First Name’, ‘Baby’s Middle Name’, ‘Baby’s Last Name’, ‘Baby’s Birthdate’, ‘Baby’s Age’, ‘Baby’s Height’, ‘Baby’s Weight’, ‘Baby’s Eye Color’, ‘Baby’s Hair Color’, ‘Baby’s Ethnicity’) VALUES (’$yourfirstname’, ‘$yourlastname’, ‘$yourphonenumber’, ‘$youremail’, ‘$babysfirstname’, ‘$babysmiddlename’, ‘$babyslastname’, ‘$babysbirthdate’, ‘$babysage’, ‘$babysheight’, ‘$babysweight’, ‘$babyseyecolor’, ‘$babyshaircolor’, ‘$babysethnicity’)”;

$result = mysql_query($insert_query, $connection) or die(mysql_error());

?>

i’ve coded the “GET” function with the corresponding html to give the impression we got it together…but we don’t. i will code the usual “POST” function once i can get the results we are trying to achieve. i’ve read php for dummies and i’m not much better off, though it did point out some mistakes i made. I’m hoping this code will allow me to get the user info into the database so i can use it. i really want to know this stuff…i like it. i just need a good point in the right direction and practice. Merci.

Can you explain your problem, it is not clear from your post - what is your question? If your code is not working, what error message are you getting, or why do you think it is not working properly.

Sponsor our Newsletter | Privacy Policy | Terms of Service