Jump to content

satbir

New Members
  • Posts

    9
  • Joined

  • Last visited

satbir's Achievements

Member

Member (2/5)

0

Reputation

  1. I have 3 pages. form for sending email is send-mail.php ..... the coding of sending email is in email.php and then thanks.php and at last redirects to main page of website. on click on button in send-mail.php...... page the coding of sending email is working well but headers not working. after sending email page is not redirecting to thanks.php and not redirecting to main page of website. ... send-mail.php <?php error_reporting(E_ALL); ini_set('display_errors', '1'); ob_start(); ?> <button class="btn btn-default" name="submit"> --> Send --> </button> email.php <?php error_reporting(E_ALL); ini_set('display_errors', '1'); ob_start(); ?> $headers .= "To: $to" . "\r\n"; $headers .= "From: $email" . "\r\n"; $headers .= "Cc: $cc" . "\r\n"; $headers .= "Bcc: $bcc" . "\r\n"; mail($to,$subject,$message,$headers); header('Location:thanks.php'); thanks.php <?php error_reporting(E_ALL); ini_set('display_errors', '1'); ob_start(); ?> <?php header("Location:refresh:3;url=http://www.myWebsite.com"); ?>
  2. Login Page if ($name == $newName) { if ($password == $newpass) { session_destroy(); $_SESSION['myAdmin']=true; header("Location:adminArea.php"); adminArea.php if ($_SESSION['myAdmin']=true) { echo "Session Y"; ?> Log Out Page <?php session_start(); ob_start(); switch ($_POST['submit']) { // ---------------------------------------------------------------------- case "signOut": session_destroy(); header("Location:../"); break; After Sign out, session remains active
  3. http://www.idea-ads.com/ <?php include("../include/commands.php"); $sname = $_REQUEST['sname']; $name = $_REQUEST['name']; $pass = $_REQUEST['pass']; $repass = $_REQUEST['repass']; $query = "select * from signup where sname = '$sname'"; $result = mysql_query("$query", $con) or die ("error in result"); $row = mysql_fetch_array($result) or die (mysql_error()); if ($row) { echo $row['sname']; } else { echo "No record"; // this part is not working } ?>
  4. coding below is not working for selecting data from mysql ______________________________________________ <?php $name=$_REQUEST['name']; $password=$_REQUEST['password']; $connect=mysql_connect('localhost','root','') or die("Error to Connect Database"); if ($connect) { mysql_select_db('dental',$connect) or die("Error in DB Select"); $qury="select * from admin where name=$name"; $run=mysql_query($qury, $connect) or die("error in sql query"); $count=mysql_num_rows($run) or die ("error in rows"); if ($count == 1) { $rows=mysql_fetch_assoc($runQury); if ($rows['password'] == $password) { header("location:adminarea.php"); } else { header("location:welcome.php"); } } else { } } ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.