Click here to Skip to main content
15,912,578 members
Home / Discussions / Web Development
   

Web Development

 
Questionhow can chek the last number Pin
idsanjeevjha1-Jan-08 0:07
idsanjeevjha1-Jan-08 0:07 
GeneralRe: how can chek the last number Pin
idsanjeevjha1-Jan-08 20:56
idsanjeevjha1-Jan-08 20:56 
GeneralPHP copying Post values into session Pin
gunner_uk200031-Dec-07 2:30
gunner_uk200031-Dec-07 2:30 
GeneralRe: PHP copying Post values into session Pin
Paul Conrad31-Dec-07 10:25
professionalPaul Conrad31-Dec-07 10:25 
GeneralRe: PHP copying Post values into session Pin
#realJSOP2-Jan-08 3:18
professional#realJSOP2-Jan-08 3:18 
GeneralRe: PHP copying Post values into session Pin
Johnny ²31-Dec-07 22:03
Johnny ²31-Dec-07 22:03 
GeneralRe: PHP copying Post values into session Pin
#realJSOP2-Jan-08 3:23
professional#realJSOP2-Jan-08 3:23 
GeneralRe: PHP copying Post values into session Pin
gunner_uk20003-Jan-08 1:54
gunner_uk20003-Jan-08 1:54 
Here is the full code:

<br />
<?php <br mode="hold" /?>	include 'DatabaseConnection.php';<br />
	<br />
	$p = $_POST['txtUserID'];<br />
	<br />
	echo "<h1>Post = $p </h1>";<br />
	<br />
	if( CheckLogIn($_POST['txtUserID'], $_POST['txtPassword']) ){<br />
	<br />
	        $_SESSION['LoggedIn'] = true;<br />
	<br />
	if (isset($_POST['txtUserID']))<br />
	{<br />
		echo "<h1>Post Set</h1>";<br />
    	        $_SESSION['User'] = $_POST['txtUserID'];<br />
                <br />
	}<br />
	else<br />
	{<br />
		echo "<h1>Post Not Set</h1>";<br />
    		$_SESSION['User'] = '';<br />
	}<br />
<br />


which returns:
Post = mi407
Post Set
Session is mi407

Hence according to this the session is stored fine;

On another page this code:

$u = $_SESSION['User'];<br />
if(isset($_SESSION['User'])){<br />
    echo "<h1>Session is Set</h1>";<br />
    echo "<h1> $u </h1>";   <br />
} else {<br />
    echo "Bugger!";<br />
}<br />


returns: Session is set.

ie it's set but the data has disappeared.


On both occassions there is:
<?php session_start(); ??>
at the top of the page before the opening HTML and DocType Tags
Questionwhy reflected schemas? Pin
Soumini Ramakrishnan31-Dec-07 0:42
Soumini Ramakrishnan31-Dec-07 0:42 
AnswerRe: why reflected schemas? Pin
Paul Conrad31-Dec-07 10:26
professionalPaul Conrad31-Dec-07 10:26 
Generalweb widget Pin
Shafaqat Ali30-Dec-07 21:58
Shafaqat Ali30-Dec-07 21:58 
GeneralRe: web widget Pin
Michael Sync30-Dec-07 22:04
Michael Sync30-Dec-07 22:04 
GeneralRe: web widget Pin
Shafaqat Ali31-Dec-07 0:46
Shafaqat Ali31-Dec-07 0:46 
GeneralRe: web widget Pin
Michael Sync31-Dec-07 21:18
Michael Sync31-Dec-07 21:18 
Questionpagingnation Pin
idsanjeevjha30-Dec-07 19:38
idsanjeevjha30-Dec-07 19:38 
GeneralAsp.net AJAX Pin
Member 464849130-Dec-07 19:26
Member 464849130-Dec-07 19:26 
GeneralRe: Asp.net AJAX Pin
Michael Sync30-Dec-07 19:54
Michael Sync30-Dec-07 19:54 
QuestionEmail using CDONTS on ASP form Pin
Hugo Migneron30-Dec-07 9:04
Hugo Migneron30-Dec-07 9:04 
GeneralMessage Closed Pin
30-Dec-07 7:45
mbhat30-Dec-07 7:45 
QuestionUsing onClick for div popup Pin
adz_61930-Dec-07 4:13
adz_61930-Dec-07 4:13 
GeneralRe: Using onClick for div popup Pin
Johnny ²30-Dec-07 13:47
Johnny ²30-Dec-07 13:47 
GeneralASP.Net Ajax Problem Pin
mehrdadc4829-Dec-07 9:20
mehrdadc4829-Dec-07 9:20 
GeneralNewbie JavaScript Question Pin
gunner_uk200029-Dec-07 3:14
gunner_uk200029-Dec-07 3:14 
GeneralRe: Newbie JavaScript Question Pin
Michael Sync29-Dec-07 22:07
Michael Sync29-Dec-07 22:07 
GeneralRe: Newbie JavaScript Question Pin
gunner_uk200030-Dec-07 5:34
gunner_uk200030-Dec-07 5:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.