Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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