Jump to content

ms_dos10

Members
  • Posts

    12
  • Joined

  • Last visited

Posts posted by ms_dos10

  1. Hello You're question not clear to get what you wanna do , but i hope u wanna this

    <?phpob_start();session_start();if($_SESSION['sessref']){//echo "my name is : dolib";		$_SESSION = array();		session_unset();		session_destroy();	  header("location:admincp.php");		exit();}ob_end_flush();?>

    and if you know Arabic tell me

  2. I have problem with session , anyone can help me to fixed it . Am working package called Xampp for Windows Version 1.4.16 .everything is good till i face this problem with session . When am trying to log in from admincp.php to student_list.php it redirect to same page admincp.php . I'm wrote code when that happen means user wrote user name and password wrong .If someone have solve or face problem like this till me can do . Because that very important me to know , i don't want to get like that again .Maybe problem with my php.ini or any setting of php . Ask me I'll check and tell what the value i have . Here my to page admincp.php and student_list.php .

    <?phpob_start();session_start();if(isset($_POST['submit'])){	   $name = $_POST['user'];	   $pws  = $_POST['pws'];	   $sql ="SELECT * FROM tbl_student WHERE name ='".$name."'and pws='".$pws."'";	   include("includes/config.php");	   $result = mysql_query($sql);	   if(mysql_num_rows($result) == 1)	   {				$_SESSION['sessref'];				header("location:student_list.php");				exit();	   }	   else	   {			   session_destroy();			   header("loaction:admincp.php");			   exit();	   }}ob_end_flush();?><html><head><link href = "includes/admin.css" type = "text/css" rel = "stylesheet"><title>Admin Panel</title></head><body valign="top"><br><br><table width="600" align="center" border="1"><form name="frm" method="post" action=""><tr>	<th colspan="2" align="center">Admin Panel</th></tr><tr>	<th colspan="2" align="center">Admin Panel Student For Project</th></tr><tr>	 <td align="right">Admin Name:</td>	 <td align="left"><input type="text" name="user" value=""/></td></tr><tr>	 <td align = right>Admin Password:</td>	 <td align="left"><input type="password" name="pws" value=""/></td></tr><tr>	 <td align="right"><input type="submit" name="submit" value="Login" onclick="return checkdata()"/></td>	 <td align="left"><input type="reset" name="reset" value="Clear"/></td></tr></form></table><table width="600" align="center" border="0"><tr>	   <td align="left"><a href="add_student.php">Registration</a></td></tr><table></body></html>

    student_list.php

    <?phpsession_start();if(!isset($_SESSION['sessref'])){		session_destroy();		header("location:admincp.php");		exit();}if(isset($_GET['msg'])){		 $msg = $_GET['msg'];		 echo"<br><br>";		echo "<center><font color=\"red\" size=3>".$msg."</font></center>";}?><html><head><link href = "includes/admin.css" type = "text/css" rel = "stylesheet"><title>Student List</title></head><body valign = top><table width = 600 align = center border = 1><tr>	<th colspan = 6 align = center>List of Student</th></tr><tr>   <td align = center>S.No.</td>   <td align = center>Student Name</td>   <td align = center>S.Image</td>   <td align = center>S.E-mail</td>   <td align = center>Action</td></tr><?include("includes/config.php");$result = mysql_query("select * from tbl_student");if(mysql_num_rows($result)== 0){		echo "<td colspan=\"6\" align=\"center\"><font size=\"3\">"."*** No Data In My DataBase ***"."</font></td>\n";}$i = 1;while($row = mysql_fetch_row($result)){			 echo "<tr>\n";			 echo "<td align = center>".$i++."</td>\n";			 echo "<td align = center>".$row[1]."</td>\n";			 echo "<td align = center><img src=".$row[3]." width = 150 height = 80></td>\n";			 echo "<td align = center>".$row[4]."</td>\n";			 echo "<td align = center>\n";			 echo "<a href = check_pin_code.php?id=".$row[0].">Edit</a>   \n";			 echo "<a href = check_pin_del.php?id=".$row[0].">Delete</a>\n";			 echo "</tr>\n";}?></table></body></html>

  3. Hi i have problem with header function , i want send or pass variable from one page to another page with help of header function .frist page :

    					$mymsg = 'Unon User Name & Password Plz Try Again <br>';					header("Location: http://index.php?msg=$mymsg");

    second page here i want pass my variable :i'll get it like that or what 'couse its not working with me here .

    <?phpif(isset($_GET['$msg'])){echo "Wrong :" . $_GET['$msg'];		}?>

  4. that my code can i add two number and get the result on the same page on text field . it'll work with sumbit button onsubmit or normal button onclick i don't know pllllllllzzzzzzzzzz help i know it normal question but what shall i do i try everything but not work anyone help me [/code]<html><head> <title></title><script type="text/javascript"> function add(a,:) { var a = document.frm.num1.value var b = document.frm.num2.value var result return result=parseint(a)+parseint(:) result = document.frm.result.value }</script></head><body><center><form name="frm" action="" method="post" onsubmit="return add()"><h5>Num One</h5><input type="text" name="num1" value=""><br> <h5>Num Two</h5><input type="text" name="num2" value=""><br><h5>Result</h5><input type="text" name="result" value=""><br><input type="submit" name="butt" value="Click Me To Add Two Number"></form></center></body><html>

    [code]<html><head>		 <title></title><script type="text/javascript">	 function add(a,b)		{		 var a = document.frm.num1.value		 var b = document.frm.num2.value		 var result		  return result=parseint(a)+parseint(b)		  result = document.frm.result.value		}</script></head><body><center><form name="frm" action="" method="post" onsubmit="return add()"><h5>Num One</h5><input type="text" name="num1" value=""><br> <h5>Num Two</h5><input type="text" name="num2" value=""><br><h5>Result</h5><input type="text" name="result" value=""><br><input type="submit" name="butt" value="Click Me To Add Two Number"></form></center></body><html>

  5. Hi i'm new here this my frist topic on the forum & also new to javascript i hope i'll get my help here .how to valid e-mail ? i wanna more info about this object or function becouse it has () indexOf() more explain about it and charAt also . i have this code i want someone to explain it to me and i'll give u link , i'll write some code if i'm going good to vaild that email and also i wanna some help on it .http://www.w3schools.com/js/tryit.asp?file...js_formvalidatemy code here

    <script type="text/javascript">//here to check at simplevar email = document.frm.e_mail.valuefor(var i = 0; i <= email.lenght; i++)  if(email.charAt(i) == "@")   {		   alert("enter vaild email ")		   document.frm.e_mail.select()		   return false   }//here to check dot simplefor(var j = 0; j <= email.lenght; j++)  if(email.charAt(j) == ".")   {		   alert("enter vaild email ")		   document.frm.e_mail.select()		   return false   }</script>

    i hope i'll get my helpp over here :):):)

×
×
  • Create New...