Hi, I have 2 servers, one free and one paid. The free one does not allow smtp, so i am trying to forward data from it to another php file on my paid server and email the data. The problem is it does not forward the correct data... Here are my codes...
Forwarding data:
<?
//initilize PHP
if($_POST['submit']) //If submit is hit
{
//then connect as user
//change user and password to your mySQL name and password
mysql_connect("db5.awardspace.com","darko886_fsacars","");
//select which database you want to edit
mysql_select_db("darko886_fsacars");
//convert all the posts to variables:
$name = $_POST['name'];
$city = $_POST['city'];
$country = $_POST['country'];
$email = $_POST['email'];
$Table = "pilots";
$pilot_num = "pilot_num";
//Insert the values into the correct database with the right fields
$result=mysql_query("INSERT INTO pilots (name,city,country,email,admission_date,status)".
"VALUES ('$name', '$city', '$country', '$email', '', 'Active')");
// last entered
$pilotId = mysql_insert_id();
//update pilot_num
$result = mysql_query("update pilots set pilot_num='INV$pilotId' where pilot_id=$pilotId");
print '<meta http-equiv="refresh" content="0;URL=http://www.you-bastards.net/pilot_finish.php?name=$name&city=$city&country=$country&email=$email&invid=INV$pilot_Id">';
}
?>
And this is the page that recieves it and sends an email with the info and then is supposed to tell the user success and tell them their id....
<?php
$to = "webmaster@you-bastards.net, mstamenic@cfl.rr.com";
$subject = "New Account";
$message = "Name: $name, City: $city, Country: $country, Email: $email, InvictaJet ID:
$invid";
mail($to, $subject, $message);
//confirm
print "Congratulations, you are now a InvictaJet pilot! Your pilot id is $invid";
?>
The second php code picks up the things in the url, for example $invid it will send me INV$pilot_Id instead of the actual thing, and for all the other fields too it will just say $city for example and not what the other page had....
How can I fix it so that the page does send the info?
Thanks
Darko