View Full Version : Help on redirect on submit

07-25-2007, 12:48 PM
Here is my script that submits a url string to invoke a text message.

// 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}&MessageText={$message}&OasText={$senderid}");
<style type="text/css">
.style1 {color: #FFFFFF}

<div align="center"></div>
<form name="form1" method="post" action="">
<table width="399" border="0">
<th width="209" height="24" scope="col"><div align="left" class="style1"><span class="style1">Recipient: </span></div>
<th width="180" scope="col"><input name="tosend" type="text" id="tosend" value="1AREACODENUMBER" size="40"></th>
<th height="24" scope="col"><div align="left" class="style1">Message:</div></th>
<th scope="col"><label>
<input name="message" type="text" id="message" size="40" />
<th height="24" scope="col"><div align="left" class="style1">Sender ID:</div></th>
<th scope="col"><label>
<input name="sendid" type="text" id="sendid" size="40">
<input type="submit" name="submit" id="submit" value="Send Message" />
<input type="reset" name="clear" id="clear" value="Clear Form" />

The script works fine as it is, however once submitting (send message) the url is posted and user is left at a white screen. My question is how can I still submit the url string to my provider while redirect to a "message sent" page. Any ideas would be greatly appreciated

07-25-2007, 12:51 PM
header ("Location: $providerurl&CompanyId=$companyid&UserId=$userid&Password=$password&Msisdn=$tosend&MessageT ext=$message&OasText=$senderid");

07-25-2007, 01:00 PM
Isn't the link you posted already in my script?

07-25-2007, 01:10 PM
you are using {} in your script, and missed out an &, you should only use {} if your using an array like

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum