View Single Post
Old 12-06-2012, 08:38 PM   PM User | #9
otty
New to the CF scene

 
Join Date: Dec 2012
Location: earth
Posts: 7
Thanks: 3
Thanked 0 Times in 0 Posts
otty is an unknown quantity at this point
it works! Now I just need to set it to do all this in the else{} area
The first part is easy enough >_< maybe have a process page after that one with the tracking stuff in it? Or can I get all of that to work somehow? I don't think javascript will run inside php tags right?
PHP Code:

<?php

$ch 
curl_init();
curl_setopt($chCURLOPT_URL"http://www.jtracker.com/lead_post.php");
curl_setopt($chCURLOPT_POST1);
curl_setopt($chCURLOPT_TIMEOUT100);
curl_setopt($chCURLOPT_RETURNTRANSFER1);
curl_setopt($chCURLOPT_POSTFIELDShttp_build_query($_POST));
$data curl_exec($ch);
curl_close($ch);

mysql_connect("localhost, "user", "password") or die("Connection Failed");
mysql_select_db("
database")or die("Connection Failed");
$referrer = $_POST['referrer'];
$first_name = $_POST['first_name'];
$last_name = $_POST['last_name'];
$email = $_POST['email'];
$phone = $_POST['phone'];
$vehicle_type_id1 = $_POST['vehicle_type_id1'];
$pickup_city = $_POST['pickup_city'];
$pickup_state_code = $_POST['pickup_state_code'];
$dropoff_city = $_POST['dropoff_city'];
$dropoff_state_code = $_POST['dropoff_state_code'];
$vehicle_runs = $_POST['vehicle_runs'];
$ship_via_id = $_POST['ship_via_id'];
$estimated_ship_date = $_POST['estimated_ship_date'];
$query = "
INSERT INTO Boat_Shipping(referrer,first_name,last_name,email,phone,vehicle_type_id1,pickup_city,pickup_state_code,dropoff_city,dropoff_state_code,vehicle_runs,ship_via_id,estimated_ship_date)VALUES('$referrer','$first_name','$last_name','$email','$phone','$vehicle_type_id1','$pickup_city','$pickup_state_code','$dropoff_city','$dropoff_state_code','$vehicle_runs','$ship_via_id','$estimated_ship_date')";
if(mysql_query($query)){
echo "
Your information is being processedPlease wait.";}
else{
echo "
Database Error";}




mysql_close();




?>
<script type="
text/javascript"> if (!window.mstag) mstag = {loadTag : function(){},time : (new Date()).getTime()};</script> <script id="mstag_tops" type="text/javascript" src="//flex.atdmt.com/mstag/site/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/mstag.js"></script> <script type="text/javascript"> mstag.loadTag("analytics", {dedup:"1",domainId:"1570529",type:"1",actionid:"104890"})</script> <noscript> <iframe src="//flex.atdmt.com/mstag/tag/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/analytics.html?dedup=1&domainId=1570529&type=1&actionid=104890" frameborder="0" scrolling="no" width="1" height="1" style="visibility:hidden;display:none"> </iframe> </noscript>

<meta http-equiv="REFRESH" content="1;url=/thankyou.php">
<
center><h1>Please <a href="/thankyou.php">Click Here</a> if your Thank You page does not load.</h1></center>

Last edited by otty; 12-07-2012 at 01:54 PM..
otty is offline   Reply With Quote