Jump to content

ncorrieri

Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

ncorrieri's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. the data's being sent to page as post (as in the brackets in the insert into mysql command, so how does that work, variable is $data right now on this page, but fields/data being posted to page names are ,[prefix],[suffix],[fname],[lname],[gender],[dob], [address1],[address2],[city],[state],, [areacode],[ipaddress],[offer],[affiliate],[subaffiliate] Should i just do '.$_POST(prefix).' to pass the prefix value?
  2. great mod!
  3. hey all - quick question, im sure a stupid one, but could use a hand nonetheless Page process Form > Post to submit page that posts to db > redirects user to 3rd page Looking to take the variables sent submit page and put them into the link going to 3rd page. currently, it looks like this <? require_once("config.php"); require_once("mail.php"); $data = $_POST; $data['dob'] = "$data[dobYYYY]-$data[dobMM]-$data[dobDD]"; $t = "registration"; $q = " INSERT INTO $t (`id`,`prefix`,`suffix`,`fname`,`lname`,`gender`,`dob`, `address1`,`address2`,`city`,`state`,`email`,`areacode`, `regtime`,`ipaddress`,`offer`,`affiliate`,`subaffiliate`) VALUE ( null,[prefix],[suffix],[fname],[lname],[gender],[dob], [address1],[address2],[city],[state],[email], [areacode],NOW(),[ipaddress],[offer],[affiliate],[subaffiliate])"; foreach ($data as $key => $value) { $value = "'".mysql_real_escape_string($value)."'"; $q = str_replace("[$key]",$value,$q ); } mysql_query($q); send_mail($data); ?> Submit data and redirecting... <script>document.location="<?=$forward_url?>"</script> ... so how would we be able to put specific values into the forwarded url location Replacing "<?=$forward_url?>" with example "page3.php?fname=Variable1&lname=Variable2" so would i need to include that in the <?php> tag? and how do i break up the URL i am forwarding to? and how would i insert variables from the above code, would it be simply [fieldname] or would i need to do .$_POST[fieldname]. or do i need to put single quotes around it? like .. "http://ww.page.com/page.php?field1=" '.$_POST[fname].' "&field2=" '.$_POST[lname].' " and am i doing that right? god i feel silly askign these
  4. that worked! thanks! now i just need to figure out whats wrong with this reporting page (ill make another thread hehe)
  5. did that, got this error. You have an error in your SQL syntax near 'VALUE ( null,'298','3920','James','McDoodle','M','1980-12-1', '101 1st Street' at line 4 following value would have been address2 but it was blank
  6. hey all - im trying to go back and repair some old code, and i dont know what im doing This should be able to connect to database fine, however, it is not inserting. Posting data to this page. What do you think is wrong with this page? ------------- <? require_once("config.php"); $data = $_POST; $data['dob'] = "$data[dobYYYY]-$data[dobMM]-$data[dobDD]"; $t = "registration"; $q = "INSERT INTO $t (`id`,`prefix`,`suffix`,`fname`,`lname`,`gender`,`dob`, `address1`,`address2`,`city`,`state`,`email`,`areacode`, `regtime`,`ipaddress`,`offer`,`affiliate`,`subaffiliate`) VALUE ( null,[prefix],[suffix],[fname],[lname],[gender],[dob], [address1],[address2],[city],[state],[email], [areacode],NOW(),[ipaddress],[offer],[affiliate],[subaffiliate])"; foreach ($data as $key => $value) { $value = "'".mysql_real_escape_string($value)."'"; $q = str_replace("[$key]",$value,$q ); } mysql_query($q); ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.