Jump to content

Archived

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

skatermike21988

Why Are My Form Submit's Opening In A New Window?

Recommended Posts

Ok. This is my issue i have a members area and a shoutbox on the main page. earlier i was trying to get my top frames page to refresh on submit but couldn't get it so i tried something else. i used include 'header.php'
and that solved that. but after i did that all of a sudden all of my form's open up in a new window.

it did not do that before i used include.

this i my codeing in header.php:
[code]
<?
SESSION_START();
header("Cache-control:private");
INCLUDE 'functions.php';


if($_SESSION['username'] && $_SESSION['password']) {

$username=$_SESSION['username'];

$sql_check = mysql_query("SELECT datejoined FROM users WHERE username='$username'");
$sql_check_num = mysql_num_rows($sql_check);



while($a_row = mysql_fetch_array($sql_check))

$datejoined= $a_row["datejoined"];

//Logged In
echo "<table border='0'><tr><td><align='center'><img border='0' src='images/longslong.jpg' width='553' height='149'>";
echo "<td valign='top'>Welcome Back $username!..";
echo "<br>Member Since: $datejoined";
echo "<br><A href='logout.php?sid=".$sid."'>Log Out</a>";
echo "<br><a href='/images.php'>Your profile</a></td></tr></table>";


} else {



echo "<table border='0'><tr><td><align='center'><img border='0' src='images/longslong.jpg' width='553' height='149'>
<td valign='top'>You Are Not Logged In
<br><a href='login.php' >Login</a> Or <a href='register.php'>Register</a></td></tr></table>"; }  


?>
<html><head>
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' />
<link rel='stylesheet' type='text/css' href='chrometheme/chromestyle4.css' />

<script type='text/javascript' src='chromejs/chrome.js'>

</script>

<base target='main'>

</head>

<body bgcolor='#000000' text='#FFFFFF'>

<align='center'>
<div id='chromemenu'>
<ul><center>
<li><a href='/index1.php' target='_self'>Home</a></li>
<li><a href='/members1.php'target='_self' onMouseover="cssdropdown.dropit(this,event,'dropmenu1')">Members</a></li>
<li><a  onMouseover="cssdropdown.dropit(this,event,'dropmenu5')">Funny Stuff</a></li>
<li><a  onMouseover="cssdropdown.dropit(this,event,'dropmenu6')">Entertainment</a></li>    
<li><a href='/freeporn.php'>Adults Only!!</a></li>
<li><a  onMouseover="cssdropdown.dropit(this,event,'dropmenu4')">Related Sites</a></li>    
<li><a  onMouseover="cssdropdown.dropit(this,event,'dropmenu2')">About Us</a></li>
<li><a  onMouseover="cssdropdown.dropit(this,event,'dropmenu3')">Contact Us</a></li>    
</h4></center></ul>
</div>

<!--1st drop down menu -->                                                  
<div id='dropmenu1' class='dropmenudiv'>
<a href='/email.php' target='_self'>Send E-Mail</a>
<a href='/login.php' target='_self'>Login</a>
<a href='/register.php' target='_self'>Register</a>
<a href='/logout.php' target='_self'>LogOut</a>
<a href='/users.php' target='_self'>Current Rgistered Users</a>
</div>

<!--2nd drop down menu -->                                                
<div id='dropmenu2' class='dropmenudiv' style='width: 150px;'>
<a href='/about.php' target='_self'>About Long Slong Productions</a>
<a href='/founder.php' target='_self'>About The Founder</a>
<a href='/conusers.php' target='_self'>About Contributing Users</a>
</div>

<!--3rd anchor link and menu -->                                                
<div id="dropmenu3" class="dropmenudiv" style="width: 150px;">
<a href="mailto:niner@longslongproductions.com">Niner</a>
<a href="mailto:goldenboner@longslongproductions.com">GoldenBoner</a>
<a href="irc://irc.tdsnet.org/longslongproductions">IRC (Internet Relay Chat)</a>
</div>

<!--4th anchor link and menu -->                                                
<div id="dropmenu4" class="dropmenudiv" style="width: 150px;">
<a href="http://www.lickmy9.com" target="top">LickMy9</a>
<a href="http://www.fishboardproductions.com" target="top">FishBoard Productions</a>
<a href="http://www.wouldudome.biz" target="top">Would U Do Me</a>
</div>

<!--4th anchor link and menu -->                                                
<div id='dropmenu5' class='dropmenudiv' style='width: 150px;'>
<a href='/funnypics.php' target='_self'>Pics</a>
<a href='/jokes.php' target='_self'>Jokes (Under Construction)</a>
<a href='/homepage.php' target='_self'>Hilarious Shit</a>

</div>


<!--4th anchor link and menu -->                                                
<div id='dropmenu6' class='dropmenudiv' style='width: 150px;'>
<a href='/clips.php'>Video Clips</a>

</div></html>  



</td></tr></table>
[/code]

and this is my codeing inside my login page:
[code]
<?
INCLUDE('header.php');


echo("<table align='center'>
<form action='login.php?act=start' method='POST'>
<tr><td>Username:</td><td><input type='text' name='username'></td></tr>
<tr><td>Password:</td><td><input type='password' name='password'></td></tr>
<tr><td><input type='submit' name='submit' value='Login'></td>
</form>
<td>Or Just Sign Up <a href=\"register.php\">Now!!!</a></td></tr></table>");  
if($_GET['act'] == "start") {
if(!$_POST['username'] || !$_POST['password']) {
echo("<a href=\"javascript:history.go(-1)\">Go back and fill out all fields, correctly!");
} else {

$passwordshow=$_POST['password'];
$username=$_POST['username'];
$password=$_POST['password'];
$check=mysql_query("SELECT * FROM `users` WHERE username = '$username' && password = '$password'")or die(mysql_error());
$CNumb=mysql_num_rows($check);

if($CNumb == '0') {
echo("<center>The username/password was invalid! Please Fix The Errors And Try Again and try again!</center>");
} else {
session_register('$username');
session_register('$password');
$_SESSION['username'] = $username;
$_SESSION['password'] = $password;

echo "
header.php.reload()
<script language='javascript'>
    window.location = \"members1.php\";
    </script>"; }  

}
}
?>
<body bgcolor="#000000" text="#FFFFFF"><center>LongSlong Productions Is Affiliated With LickMy9 And FishBoard Productions. All Rights Reserved Copyright 2006-2007

</body>
[/code]

Some One Please Help Me

Share this post


Link to post
Share on other sites
my url is [a href=\"http://www.longslongproductions.com\" target=\"_blank\"]http://www.longslongproductions.com[/a]

please disregard the domain name it is only a comedy site :)

Share this post


Link to post
Share on other sites

×

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.