Help on redirect on submit

I am need a little assistance with my script.

The script below collects information to submit to my SMS provider. The message is generated by submitting a URL with specific values and the message is then sent. At this point the script DOES work.

Once the message is submitted, I am left at a blank page on the site on I am submitting the URL to. I would like to submit the url in the background while redirecting to a page on my own site.

// Constant Information(Make sure to edit only things between “” or else this may effect the program.)
$companyid = “sendpassword”; //sendpassword
$password = “password”; // PASSWORD
$userid = “myid”; // User ID
$providerurl = “https://myproviderurl”; // provider url format of the url provider.

if (isset($_POST[‘submit’])){
$tosend = trim($_POST[‘tosend’]);
$message = trim($_POST[‘message’]);
$senderid = trim($_POST[‘sendid’]);

header (“Location: {$providerurl}CompanyId={$companyid}&UserId={$userid}&Password={$password}&Msisdn={$tosend}&MessageT ext={$message}&OasText={$senderid}”);

Sender ID:
[/php] [size=99px] [b]*Mod Edit: Change Code Tags to PHP tags for readability.[/b][/size]

What is or isn’t the script doing that it should be?

The scripts works fine and submits the proper URL to generate a text message. However after submitting I am just left with a white screen with the specially crafted URL. Since the URL is submitted to my providers site. I would like to submit the url, but redirect the user to another page (different the the url I am submitting)

You could a javascript pop-up window for this.

You could have it submit the page in a javascript pop-up and you can control where on the users screen it would pop-up and how big. Since there is no useful information you could just make it a tiny window that pop-ups in the upper corner and have javascript wait a bit and then close the window. All the while the user stays on your site and sees a nice display message of whatever it is you would like.

Sponsor our Newsletter | Privacy Policy | Terms of Service