i’ve some customers in my db. The PHP script choose the customers precisely, however redirect not working.
Please assist anybody my script is under:
if($sqlquery==1)
{
$_SESSION'electronic mail'=$electronic mail;
$_SESSION'password'=$password;
wp_redirect( 'https://mcqpage.com/somepage', 301 );
exit;
}
else
{
header("location:http://www.mcqpage.com/index.php");
}
my element are as comply with
login web page
<type onsubmit="return formValidator()" motion='https://mcqpage.com/connection/' methodology='submit'>
<h2>Enter Your Details</h2><hr/>
<label>Name :</label>
<enter kind="text" title="addr1" id='addr' /><br />
<label>Password :</label>
<enter kind="password" title="password" id="password">
<enter kind="submit" worth="Check Form" />
connection web page
> insert_php
session_start();
if($_POST'addr1'!="" && $_POST'password'!=""){
session_start();
[email protected]_connect("") or
mysql_error();
if (!$connec) {
die('Could not join: ' . mysql_error());
}
$electronic mail=$_POST'addr1';
//echo"$email";
$password= $_POST'password');
if ($electronic mail=="")
{
echo "Enter User Name.......";
}
else
$outcome = mysql_query("SELECT * FROM `database`.`desk` WHERE
password='$password' and title="$email"");
$information = mysql_num_rows($outcome);
if($information==1)
{
$_SESSION'electronic mail'=$electronic mail;
$_SESSION'password'=$password;
wp_redirect( 'https://mcqpage.com/web page', 301 );
exit;
}
else
{
header("location:http://www.mcqpage.com/index.php");
}
}
//connection closed
mysql_close ($connec);}
else{
header("location:http://www.mcqpage.com/index.php");
}
/insert_php
@Nadav My error_log reveals the next error:
> 02-May-2017 07:29:06 UTC PHP Warning: session_start(): Cannot ship session cookie - headers already despatched by (output began at /dwelling/mysite/public_html/wp/wp-includes/class.wp-styles.php:237) in /dwelling/mysite/public_html/wp/wp-content/plugins/insert-php/insert_php.php(47) : eval()'d code on line 2
>
> 02-May-2017 07:29:06 UTC PHP Warning: session_start(): Cannot ship session cache limiter - headers already despatched (output began at /dwelling/mysite/public_html/wp/wp-includes/class.wp-styles.php:237) in /dwelling/mysitec/public_html/wp/wp-content/plugins/insert-php/insert_php.php(47) : eval()'d code on line 2
>
> 02-May-2017 07:29:06 UTC PHP Warning: Cannot modify header data - headers already despatched by (output began at /dwelling/mysitec/public_html/wp/wp-includes/class.wp-styles.php:237) in /dwelling/mysite/public_html/wp/wp-content/plugins/insert-php/insert_php.php(47) : eval()'d code on line 25