Jump to content


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

  • Please log in to reply
3 replies to this topic

#1 skatermike21988

  • Members
  • PipPipPip
  • Advanced Member
  • 100 posts
  • LocationFlorida

Posted 20 March 2006 - 04:16 AM

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:
INCLUDE 'functions.php'; 

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


$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>"; }  

<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'>


<base target='main'>


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

<div id='chromemenu'>
<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>    

<!--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>

<!--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>

<!--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>

<!--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>

<!--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>


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




and this is my codeing inside my login page:

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> 
<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 { 

$check=mysql_query("SELECT * FROM `users` WHERE username = '$username' && password = '$password'")or die(mysql_error()); 

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

echo "
<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


Some One Please Help Me

#2 brown2005

  • Members
  • PipPipPip
  • Advanced Member
  • 943 posts

Posted 20 March 2006 - 07:41 PM

whats the url so i can look what you mean?

#3 lpxxfaintxx

  • Members
  • PipPipPip
  • Advanced Member
  • 181 posts

Posted 20 March 2006 - 08:52 PM

Hmm, thats odd. Your HTML is correct (I think), it could possibly be your server's settings.

#4 skatermike21988

  • Members
  • PipPipPip
  • Advanced Member
  • 100 posts
  • LocationFlorida

Posted 23 March 2006 - 05:36 AM

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 :)

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users