Home >
Technical & Creative Skills >
Programming, Servers & Scripts
Problem Passing CoReg Data Correctly (5)
12-31-2011 05:33 AM
#1
lavish (Member)
Problem Passing CoReg Data Correctly
Hey guys,
I'm getting onto my developer and he's being real slow right now so I figured I'd ask this here.
Right now, he's set it up so the variables from the form are being passed to a file called write.php which is below:
<?php
$myFile = "database.txt";
$fh = fopen($myFile, 'a') or die("can't open file");
$fname = $_GET['fname']."\t|";
fwrite($fh, $fname);
$lname = $_GET['lname']."\t|";
fwrite($fh, $lname);
$age = $_GET['age']."\t|";
fwrite($fh, $age);
$gender = $_GET['gender']."\t|";
fwrite($fh, $gender);
$email = $_GET['email']."\t|";
fwrite($fh, $email);
$phone = $_GET['phone']."\n";
fwrite($fh, $phone);
fclose($fh);
header("Location: /directory/coregframe.php?sid=&fname=".$_GET['fname']."&lname=".$_GET['lname']."&email=".$_GET['email']."&phone=".$_GET['phone']."&age=".$_GET['age']."&gender=".$_GET['gender']);
?>
The write.php file is recording the data to a text file on my server which works fine.
But when coregframe.php is called the information is not being passed correctly to my gtoffers.com URL.
The code in coregframe.php that looks for the variables is this:
<iframe style="border:0px solid; margin:0 auto; width:775px; height:400px; text-align:center;" scrolling="no" src="http://s.gtoffers.com/entry.php?p=a2435400vv1&limit=6&fname=<?php echo $_GET["fname"];?>&lname=<?php echo $_GET["lname"];?>&phone=<?php echo $_GET["phone"];?>&email=<?php echo $_GET["email"];?>&age=<?php echo $_GET["age"];?>&gender=<?php echo $_GET["gender"];?>&framed=1&redirect=http://trackingurl.com/redirect/dl.php?t202id=4545&t202kw=<?php echo $_GET["sid"];?>" frameborder="0">
Your browser does not support inline frames or is currently configured not to display inline frames.
</iframe>
Any help would be appreciated!
Cheers.
12-31-2011 06:50 AM
#2
dubbsy (Member)
I'm no coder, but all that seems too complicated to me... I just use the code that Brock posted and I have no problems...
Code for collecting all the info:
<?php
$email=$_GET["email"];
// $email=trim(@$_SESSION['email']);
if($email!=""){
$myFile = "emails.txt";
$fh = fopen($myFile, 'a') or die("can't open file");
$stringData = $email."\n";
fwrite($fh, $stringData);
fclose($fh);
}
?>
Then I would just concatenate the other variables that you want to write to the emails.txt file to the $stringData variable. I also don't have a header redirecting to anything... idk if that's important or not, but I haven't had any problems what so ever so far.
Code for your step 2 page:
<?
session_start();
$fname=@$_GET['first_name'];
$lname=@$_GET['last_name'];
$email=@$_GET['email'];
$p1=@$_GET['mobile_number1'];
$p2=@$_GET['mobile_number2'];
$p3=@$_GET['mobile_number3'];
$phone=$p1.$p2.$p3;
// $subid="mysubid";
$spkey="yoursilverpathkeygoeshere";
$gtkey="gtkeygoeshere";
$exit="the end of path url";
$exit=urlencode($exit);
/*$spurl="http://www.silver-path.com/path.php?src_key=$spkey&email=$email&first_name=$f name&last_name=$lname&mobile_number=$phone&country =US&subid1=$t202subid&exit_url=$exit";
*/
$gturl="
http://s.gtoffers.com/entry.php?p=$gtkey&limit=6&email=$email&framed=1&f name=$fname&lname=$lname&phone=$phone&sid=&redirec t=$exit";
$url=$gturl;
?>
Iframe URL:
<iframe src="<?=$url?>" scrolling="no" frameborder="0" height="1200" width="100%"></iframe>
And that's all I have for php really.
Hope that helps bro
12-31-2011 11:16 AM
#3
polarbacon (Moderator)
well first things first....
can you see the info being passed to the iframe page query string? "/directory/coregframe.php" should have all that data on it.....
01-02-2012 02:31 AM
#4
lavish (Member)
Thanks dubbsy! Unfortunately I'm not really much of a coder myself - and doing it that way seems like I'd basically have to completely change how everything flows on the page, when I'm quite sure it could just be a sentence or something that needs to be added/changed somewhere.
@polarbacon: nothing is being passed to that string except for the subid - the URL looks like this http://www.coregsite.com/directory/c...hp?sid=1123943
01-02-2012 05:59 PM
#5
presfox (Member)
check your PM, ill fix it for ya
Home >
Technical & Creative Skills >
Programming, Servers & Scripts