right change that to :
[php]session_start();
print_r($_GET);[/php]
as looking at http://www.scicomonline.com/new/Alink/form.html that form uses get not post
right change that to :
[php]session_start();
print_r($_GET);[/php]
as looking at http://www.scicomonline.com/new/Alink/form.html that form uses get not post
this is when im logged in…
Array ( [name] => ali [email] => [email protected] [button1] => Submit [f0] => file1.zip [l0] => [x] => 60 [m] => 0 [l] => 0 [t] => [c] => 1278274962 [g] => http://www.vibralogix.com/index.htm [a] => e4a0044551211c88a414d75b5ff8122e [linklokform] => 1 ) total matches: 1
http://www.vibralogix.com comes cox im using the demo form they gave… ill change that later…
and here is when im not logged in…
Array ( [name] => ali [email] => [email protected] [button1] => Submit [f0] => file1.zip [l0] => [x] => 60 [m] => 0 [l] => 0 [t] => [c] => 1278275100 [g] => http://www.vibralogix.com/index.htm [a] => ecbcb1d1d3ae66c718c0284f90fcf8b4 [linklokform] => 1 ) total matches: 0
so bro i think i have to sleep now… cox its 1:30 at midnight here… really reallyy thanxx… so ill reply to u tomorrow morning then… hope its okeii with you… thankxx… ill wait for you reply to this message…
yeah no problem I’ll try to help tomorrow won’t be as often as today as I’ll be at work.
change session_start section to:
[php]session_start();
$_SESSION[‘secure_email’] = $_GET[‘email’];[/php]
then change the matches query to:
[php]$matches = mysql_result(mysql_query(“SELECT COUNT(*) as Num FROM secure_users WHERE email=’”.$_SESSION[‘secure_email’]."’ AND user_id=’".$_SESSION[SECURE_SESSION_PREFIX.“secure_userId”]."’ "),0);
die(“total matches: $matches”);[/php]
all being well it will show the right matches. Get some sleep
says total matches = 0 if im logged in or not… its same…
sorry noticed an old reference in there try this instead:
[php]$matches = mysql_result(mysql_query(“SELECT COUNT(*) as Num FROM secure_users WHERE email=’”.$_SESSION[‘secure_email’]."’ AND user_id=’".$_SESSION[‘secure_userId’]."’ "),0);
die(“total matches: $matches”);[/php]
ok when im logged in … it says
total matches: 1
and when im not
total matches: 0
so bro does it matter to the name i enter in the form.php
i dnt want it to be a problem… i want only the email to matter…
so does it bring any changes… if not its ok
so wats next…
Replace:
[php]// make a connection to mysql here
$conn = mysql_connect (DBHOST, DBUSER, DBPASS);
$conn = mysql_select_db (DBNAME);
if(!$conn){
die( “Sorry! There seems to be a problem connecting to our database.”);
}
$matches = mysql_result(mysql_query(“SELECT COUNT(*) as Num FROM secure_users WHERE email=’$clientemail’ AND user_id=’”.$_SESSION[“secure_userId”]."’ "),0);
die(“total matches: $matches”);
$sql = mysql_query(“SELECT user_id, email FROM secure_users WHERE email=’$clientemail’ AND user_id=’”.$_SESSION[“secure_userId”]."’ ")or die(mysql_error());
$n = mysql_num_rows($sql);
if($n == 1){} else {
linklokShowMessage($ErrorTemplate,“The email address provided does not match the one we have on file.
Click your browsers BACK button and try again.”);
exit;[/php]
with:
[php]// make a connection to mysql here
$conn = mysql_connect (DBHOST, DBUSER, DBPASS);
$conn = mysql_select_db (DBNAME);
if(!$conn){
die( “Sorry! There seems to be a problem connecting to our database.”);
}
$sql = mysql_query(“SELECT user_id, email FROM secure_users WHERE email=’”.$_SESSION[‘secure_email’]."’ AND user_id=’".$_SESSION[“secure_userId”]."’ ")or die(mysql_error());
$n = mysql_num_rows($sql);
if($n == 1){} else {
linklokShowMessage($ErrorTemplate,“The email address provided does not match the one we have on file.
Click your browsers BACK button and try again.”);
exit;
}[/php]
you can also remove the print_r($_GET) where the session_start is.
The name is not checked so it can be anything it won’t effect anything.
this is what i have at the top
[php]<?php
session_start();
$_SESSION[‘secure_email’] = $_GET[‘email’];[/php]
do i need to remove the full last line… or what else
no leave the last line, test it now
so what did u mean by ““you can also remove the print_r($_GET) where the session_start is.””"
ok when im logged in
total matches: 1
and when im not…
total matches: 0
I mean where:
[php]session_start();
print_r($_GET);[/php]
remove print_r($_GET);
also you should not be getting the total matches now it was removed:
i dnt have that one… this is what i have
[php]session_start();
$_SESSION[‘secure_email’] = $_GET[‘email’];[/php]
so what should i do… umm… if u wanna have a look at how i have the full script… pls provide me ur email id… so that ill mail u… if u dnt mind… so wats next… ryt nw it shows 1 when logged in and 0 when not logged in…
my email is dave[@]daveismyname.com send me the script and I’ll take a look.
it does sound like it’s now working with the die command stopping the script your not seeing the error messages when there is no match.
yeah was trying to use [ @ ] as I didn’t want to expose my email to spam bots. got your email just looking at the script now.
I didn’t need to make any changes to your script it all looks ready to go, you should not be getting ‘total matches’ when you run it now.