jetdiscos Posted December 22, 2006 Share Posted December 22, 2006 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 outecho "<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 inputif($_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 More sharing options...
Daniel0 Posted December 22, 2006 Share Posted December 22, 2006 Use [code]target='parent'[/code] on your form. Link to comment https://forums.phpfreaks.com/topic/31575-frames/#findComment-146352 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.