Jump to content

Frames


jetdiscos

Recommended Posts

I am using the following script for my login script on my website. It is placed within a frame on the page and i want it to open in the full page rather than in that frame. The text highlighted is the link  which i want to load in the whole page.
[code]<?php
//Write the login form out
echo "<form method=post action=login3.php?action=check><table><tr><td><font size=2>Username:</font></td><td><input type=text name=Uname></td></tr><tr><td><font size=2>Password:</font></td><td><input type=password name=Pword></td></tr><tr><td></td><td><input type=submit value=Login></td></tr><tr><td>
<br>
<a href=forgotpassword.php><font size=1>Forgot password</font></a></td><td>
<br>
<a href='apply/contact.php'><font size=1>Apply for an account</font></td></tr></table></form>";
//check the input
if($_GET['action'] == 'check')
{
//find the user
$result = mysql_query("SELECT * FROM loginphp WHERE Uname='{$_POST['Uname']}'") or mysql_query("SELECT * FROM loginphp WHERE Uname='{$_POST['Family']}'") or die(mysql_error());
$row = mysql_fetch_array( $result ); //set $row to result
  if($row['Uname'] == "")
  {
      echo error();
  }
  else
  {
      //$enc = md5($_POST['Pword']);
      $enc = $_POST['Pword'];
      if($row['Pword'] == $enc)
  {
      $_SESSION['Uname'] = $_POST['Uname'];
          $_SESSION['lp'] = 'pl';
  header("Location:snow-ball.php");

          exit;
  }
  else
  {
    echo error();
  }
  }
}
if($_GET['action'] == 'registered')
{
echo "<b>Registered successfully</b>";
}
function error()
{
echo "<b>The username/password is incorrect</b>";
}
?>
[/code]
Link to comment
https://forums.phpfreaks.com/topic/31575-frames/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.