The problem you seem to be having was outlined in those replies I sent you and images of the actual problem where sent to you directly, did you receive those? this is where your issue * WAS * (Now it is single quotes as you have changed the code).
-
There is no issue with PHP code and Freeway, Freeway is not the problem (That is 100%).
-
The little balls * WHERE * your issue.
-
The quotes you used in your original code example where not the issue either, but the single ones you are using now * ARE * the issue!
You ‘generally’ don’t put PHP variables inside single quotes or they will not be parsed, a PHP variable would go inside double quotes as you had it in your first post. You could write your code as follows:
header("Location:$destination_url");
// or
header('Location:' . $destination_url);
// or
header("Location:" . $destination_url);
// but definately not
header('Location: $destination_url');
The code will work as between the tildes below:
<?php
if ( $_POST ) {
$wname1 = $_POST['name1'];
$wname2 = $_POST['name2'];
if ($wname1 !== ' ') {
$destination_url = "insertfunction.php";
header("Location:$destination_url");
exit();
}
}
// VALUES FROM FORM
$wname1 = $_POST['name1'];
$wname2 = $_POST['name2'];
$wname3 = $_POST['name3'];
?>
HTH
On May 16, 2012, at 11:26 AM, ksp wrote:
Thanks for your replies
I agree the problem is located to the following two lines:
$destination_url = “insertfunction.php”;
header(‘Location: $destination_url’);
Everything else works perfect.
And I’m sure getting correct into the if statement, because the exit() is performed correct.
if ($wname1 !== ’ ') {
$destination_url = “insertfunction.php”;
header(‘Location: $destination_url’);
exit();
}
}
So back to my concern
Can’t Freeway handle the “header Location” command?
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options