Jump to content

lovephp

Members
  • Posts

    530
  • Joined

  • Last visited

Everything posted by lovephp

  1. ok well let so clear again on my friends website i put a link like <a href="mysite.com/form.php?cid=prg1234">My form</a> the cid im using as to keep track that user with that cid is coming from my friend site.and yes cid comes from the URL
  2. so how can i make it to exist in $_REQUEST?
  3. i get code] Array ( [phpSESSID] => f5d20dedfeb5004268f8c3e4d7740d21 [cprelogin] => no [cpsession] => n:eQi2Pjk3ipO9_fAcppx_Iln7dyxnPzrMmsbKVmV6QuDZvMR0dIRoOPXFCdVfxAvH [langedit] => [lang] => [__utma] => 133155729.404469517.1349470259.1349470259.1349470259.1 [__utmc] => 133155729 [__utmz] => 133155729.1349470259.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none) [__atuvc] => 11|40 ) Session: Array ( [cid ] => [dutyGuard] => 52 [cid] => ) [/code]
  4. i know in my first comment i wrote $_SESSION['cid'] = $cid; and this is something $cid = $_SESSION['cid']; i was trying to see if it works none is working
  5. here see <?php session_start(); include ("functions.php"); include ("config.php"); $cid = $_REQUEST['cid']; $cid = $_SESSION['cid']; print_r($_SESSION); /////////////////////////spam check//////////////////////////// function encode_str($input){ for ($i = 0; $i < strlen($input); $i++) { $output .= "".ord($input[$i]).';'; } return $output; } function dutyGuard(){ $first_number=mt_rand(1, 94); $second_number=mt_rand(1, 5); $_SESSION["dutyGuard"]=($first_number+$second_number); $operation=" <b>".encode_str($first_number ." + ". $second_number)."</b> ?"; echo "What's ".$operation; } ?>
  6. ok i got this link which sends a id something like page.php?cid=prg1234 now on my form page i got $cid = $_REQUEST['cid']; $_SESSION['cid'] = $cid ; on the url i do see the link like form.php?cid=prg1234 but when i print session i get not value? print_r($_SESSION['cid']); this hows nothing.
  7. actually it does not have to do a sum just print which radio is selected but im unable to get it
  8. <!DOCTYPE html> <html> <head> <script type="text/javascript"> function DisplayPrice(price){ var val = 0; for( i = 0; i < document.form.price.length; i++ ){ if( document.form.price[i].checked == true ){ val = document.form.price[i].value; } } var parseInt(val); document.getElementById('totalSum').value=sum; } </script> </head> <body> Choose another number:<br> <form name="form2" id="form" runat="server"> <br> <input id="rdo_1" type="radio" value="15" name="price" onclick="DisplayPrice(this.value);">15 <br> <input id="rdo_2" type="radio" value="87" name="price" onclick="DisplayPrice(this.value);">87 <br> </form> $<input type="text" name="totalSum" id="totalSum" value="" size="2" readonly="readonly"> </body> </html>
  9. Chill guys its not mine eh someone asked me to do it so i made it.
  10. thanks soo muchhhhhh guys really thankful. and yes its not safe but got no other way either. cheers all
  11. still not getting it. will really be thankful if someone can show me how
  12. how will i send two at once? im not being able to understand. the form is one the things is only with the CC i wish to get the credit card number on it but on the actual customer submit he should receive all the details but not the credit card number
  13. how to acheive this, when the user submits the form a email sends to his email with $to and i have CC billing@somesite.com now on $to i do not wish to send the credit card number but on CC i wish to get the full number but how do i get it done? function sendMail($fData) { $orderid = randomPrefix(6); $ip = getRealIpAddr(); date_default_timezone_set('Asia/Calcutta'); $date = date('m/d/Y', time()); $time = date('h:i:s a', time()); $to = $fData['email']; $fname = $fData['fname']; $lname = $fData['lname']; $address1 = $fData['address1']; $address2 = $fData['address2']; $country = $fData['country']; $city= $fData['city']; $state = $fData['state_p']; $phone = $fData['phone']; $card_holder = $fData['cname']; $card_type = $fData['ctype']; $card_number = $fData['cnumber']; $expiry_d = $fData['xdate']; $expiry_m = $fData['xmonth']; $expiry_y = $fData['xyear']; $cvv = $fData['cvv']; $headers = "From: somesite.com <sales@somesite.com>\r\n"; $headers .= "Cc: billing@somesite.com\r\n"; $headers .= "Reply-To: <sales@somesite.com>\r\n"; $headers .= "Return-Path: sales@somesite.com\r\n"; $headers .= 'MIME-Version: 1.0' . "\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= 'Content-type: text/html; charset=us-ascii' . "\r\n"; 'X-Mailer: PHP/' . phpversion(); $message = "<p align=\"center\"><font size=\"+1\" weight=\"bold\" width=\"600px\" color=\"orange\">Order Confirmation!</font><hr color=\"#000000\" size=\"2\"></p> Dear $fname $lname, <br/><br/>\n\n Your order has been successfully placed <br/><br/><br/>\n\n\n <h2>Billing Details</h2> <br/>\n\n <b>Order ID:</b> $orderid <br/> <br/>\n\n <b>Name:</b> $fname $lname<br/> <br/>\n\n <b>Address Line 1:</b> $address1 <br/><br/>\n\n <b>Address Line 2:</b> $address2 <br/><br/>\n\n <b>Country:</b> $country <br/><br/>\n\n <b>City:</b> $city <br/><br/>\n\n <b>State/Province:</b> $state <br/><br/>\n\n <b>Phone Number:</b> $phone <br/><br/>\n\n <b>E-mail Address:</b> $to <br/><br/>\n\n\n <h2>Credit Card Details</h2> <br/>\n\n <b>Name on the Card:</b> $card_holder <br/><br/>\n\n <b>Credit Card Number:</b> $card_number <br/><br/>\n\n <b>Expiration Date:</b> $expiry_d/$expiry_m/$expiry_y <br/><br/>\n\n <b>Cvv Number:</b> $cvv <br/><br/>\n\n <b>Card Type:</b> $card_type <br/><br/>\n\n\n Regards, <br/> \n somesite.com <br/>\n<br/>\n <hr color=\"#000000\" size=\"2\"> <p align=\"center\"> <font size=\"-2\" width=\"600px\" color=\"#333\"> <b>Order placed by:</b> $ip <b>on</b> $date <b>around</b> $time</font>\n <br/> <font size=\"-2\" weight=\"bold\" width=\"600px\" color=\"#615F5F\"> © copyrights <a href=\"http://somesite.com\" target=\"_blank\">www.somesite.com</a> 2012-2013</font></p><br/>\n"; $subject = "(Order Confirmation) - somesite.com!"; mail($to, $subject, $message, $headers); }
×
×
  • 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.