[SOLVED] not processing or just taking too long

This is a discussion on "[SOLVED] not processing or just taking too long" within the PHP Forum section. This forum, and the thread "[SOLVED] not processing or just taking too long are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Oct 17th, 2007, 11:37
saltedm8's Avatar
Lead Administrator

SuperMember
Join Date: Nov 2005
Location: Always About
Age: 27
Posts: 1,299
Blog Entries: 1
Thanks: 1
Thanked 6 Times in 6 Posts
[SOLVED] not processing or just taking too long

i am having problems with processing my login script

its taking ages, or its just not working - one of the two

below are all references to the login script

username = test
password = test

thanks

http://www.fmat.co.uk/index.php

check.php

PHP: Select all

<?php include 'config.php';?>
<?php
  session_start
();
  if(
$_SERVER['REQUEST_METHOD'] == "POST") {
    
mysql_connect($dbhost$dbuser$dbpass);
    
mysql_select_db($dbname) or die( "Unable to connect to database");
    
$result mysql_query("SELECT * FROM members WHERE username='" .
      
$_POST['username'] . "' AND
      password=md5('" 
$_POST['password'] . "')");
    if(
mysql_num_rows($result) > 0) {
      
$_SESSION['is_logged_in'] = 1;
    }
  }
  if(!isset(
$_SESSION['is_logged_in'])) {
    
header("location:index.php");
  } else {
    
header("location:authenticated.php");
  }
?>
login_success.php

PHP: Select all

<? 
session_start
();
if(!
session_is_registered(myusername)){
header("location:index.php");
}
?>
<html>
<body>
Login Successful
</body>
</html>
authenticated.php

PHP: Select all

<?php
  session_start
();
  
session_destroy();
  
header("location:authenticated.php");
?>
index.php

PHP: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
<!--
#header {
 width:800px;
 float: right;
 margin-right:5em;
 border:double;
 border-color:#999999;
}
#container {
 width:799px;
 float: right;
 margin-right:5em;
 border:double;
 border-color:#999999;
 background-image:url(images/Circleswallpaper_1680.jpg);
}
#rcontainer {
 width:239px;
 float: right;
 margin-right:1em;
 margin-top:1em;
 
}
#mainc {
 width:500px;
 float: left;
 margin-left:1em;
 margin-top:1em;
 margin-bottom:1em;
 background-color:#ffffef;
 padding:3px 3px 3px 10px;
 border:double;
 border-color:#999999;
 
}
#main {
 width:480px;
 float: left;
 margin-left:1em;
 margin-top:1em;
 margin-bottom:1em;
 background-color:#ffffef;
 border-color:#999999;
 
}
 
#plug1 {
 width:219px;
 float: right;
 margin-right:1em;
 margin-bottom:1em;
 background-color:#FFFFFF;
 padding:3px 3px 3px 1px;
 border:double;
 border-color:#999999;
 
}
#plug2 {
 width:212px;
 float: right;
 margin-right:1em;
 background-color:#FFFFFF;
 padding:3px 3px 3px 10px;
 border:double;
 border-color:#999999;
}
#footer {
    width:790px;
 float: right;
 margin-right:5em;
 border:double;
 border-color:#999999;
 background-color:#B9D1B1;
 
}
#menu {
 width:800px;
 float: right;
 margin-right:5em;
 margin-top:0em;
 border:thin;
 border-color:#999999;
}
#navlist
{
margin: 0;
padding: 2px 0 20px 10px;
}
#navlist ul, #navlist li
{
margin: 0;
padding: 0;
display: inline;
list-style-type: none;
}
#navlist a:link, #navlist a:visited
{
float: left;
line-height: 14px;
font-weight: bold;
margin: 0 10px 4px 10px;
text-decoration: none;
color: #999;
}
#navlist a:link#current, #navlist a:visited#current, #navlist a:hover
{
border-bottom: 4px solid #000;
padding-bottom: 2px;
background: transparent;
color: #000;
}
#navlist a:hover { color: #000; }
body {
 background-image: url(images/Lime_1600.jpg);
}
.style1 {font-family: Georgia, "Times New Roman", Times, serif; color: #666666; }
 
-->
</style>
</head>
 
<body>
<div id="header"><img src="http://www.webforumz.com/images/free-header-image-tree.jpg" alt="logo" width="800" height="200" /></div>
<div id="menu"><div id="navcontainer">
<ul id="navlist">
<li id="active"><a href="#" id="current">Item one</a></li>
<li><a href="#">Item two</a></li>
<li><a href="#">Item three</a></li>
<li><a href="#">Item four</a></li>
<li><a href="#">Item five</a></li>
</ul>
</div></div>
<div id="container">
  <div id="rcontainer">
<div id="plug1"><span class="style1">
  </span><span class="style1"></span><span class="style1"><table width="221" border="0">
  <tr>
  <form name="form1" method="post" action="check.php">
    <td width="215"><div align="center"><strong>Admin Login</strong>
    </div>
      <table width="205" border="0">
        <tr>
          <td width="64">Username:</td>
          <td width="144"><input name="username" type="text" name="username" size="15"></td>
        </tr>
        <tr>
          <td>Password:</td>
          <td><input name="password" type="password" name="password" size="15"></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>
            <div align="right">
              <input type="submit" id="submit" value="Submit">
              </div>
          </td>
        </tr>
      </table></td>
      </form>
  </tr>
</table></span></div>
<div id="plug2">
  <p><span class="style1">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Duis ligula lorem, consequat eget, tristique nec, auctor quis, purus. Vivamus ut sem. Fusce aliquam nunc vitae purus. Aenean viverra malesuada libero. Fusce ac quam. Donec neque. Nunc venenatis enim nec quam. Cras faucibus, justo vel accumsan aliquam, tellus dui fringilla quam, in condimentum augue lorem non tellus. Pellentesque id arcu non sem placerat iaculis. Curabitur posuere, pede vitae lacinia accumsan, enim nibh elementum orci, ut volutpat</span></p>
  </div>
</div>
<div id="mainc">
  <div class="style1" id="main">
    <?php include 'main.php';?>
  </div>
 
  </div>
<div id="footer">
  <p>&nbsp;</p>
  <p>&nbsp;</p>
</div>
</div>
</body>
</html>
blogform.php

PHP: Select all

<?php
  session_start
();
  if (!isset(
$_SESSION['is_logged_in'])) {
    
header("Location:index.php");
    die();
    }
?>
<script language="javascript" type="text/javascript" src="../blog/jscripts/tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
tinyMCE.init({
 mode : "textareas"
});
</script>
<?php include 'config.php';?>
<?php $d 
=  date("dS F Y");?>
<?php 
include("form.php"); ?>
<style type="text/css">
<!--
body {
 background-color: #FFFFCC;
}
-->
</style> 
<div align="center">
  <form action="<?php echo $_SERVER['PHP_SELF'?>" method="post">
    <p><input name="title" type="text" value="TITLE" size="100">
    </p>
    <table width="600" height="39" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="270"><input name="date" type="text" value="<?php echo($d); ?> "45"></td>
        <td width="58">&nbsp;</td>
        <td width="136">
          <label></label>
          <div align="center"><strong>SUBJECT:</strong></div></td>
        <td width="136"><select name="subject" size="1" id="subject">
<option>choose...</option>
<option>website design tips</option>
                        </select></td>
      </tr>
    </table>
    <p>
      <?php include ("created.php");?>
    </p>
    <label></label>
    <p>
      <textarea name="blog_mes" cols="100" rows="15">BLOG MESSAGE</textarea>
    </p>
    <table width="632" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="494">&nbsp;</td>
        <td width="138"><div align="right">
          <input type="submit" name="submit" value="SUBMIT BLOG">
        </div></td>
      </tr>
    </table>
  </form>
</div>
</body>
</html>
__________________
My Recipe forum...don't click here
Last Blog Entry: Basic Advice for newbies (Feb 1st, 2008)
Reply With Quote

  #2 (permalink)  
Old Oct 17th, 2007, 12:07
New Member
Join Date: Oct 2007
Location: London
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Re: not processing or just taking too long

Your authenticated.php page is redirecting to itself so will never complete.
Reply With Quote
  #3 (permalink)  
Old Oct 17th, 2007, 12:29
saltedm8's Avatar
Lead Administrator

SuperMember
Join Date: Nov 2005
Location: Always About
Age: 27
Posts: 1,299
Blog Entries: 1
Thanks: 1
Thanked 6 Times in 6 Posts
Re: not processing or just taking too long

i was also destroying the session before i even started

i changed it to this

PHP: Select all

<?php
 session_start
();
 
header("location:blogform.php");
?>
but now its letting anyone in ?? with or without username and password
__________________
My Recipe forum...don't click here
Last Blog Entry: Basic Advice for newbies (Feb 1st, 2008)

Last edited by saltedm8; Oct 17th, 2007 at 12:51.
Reply With Quote
  #4 (permalink)  
Old Oct 17th, 2007, 12:59
saltedm8's Avatar
Lead Administrator

SuperMember
Join Date: Nov 2005
Location: Always About
Age: 27
Posts: 1,299
Blog Entries: 1
Thanks: 1
Thanked 6 Times in 6 Posts
Re: not processing or just taking too long

dont worry, done it, it seems to be working now
__________________
My Recipe forum...don't click here
Last Blog Entry: Basic Advice for newbies (Feb 1st, 2008)
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] making sure characters saved to db remain in the long version, like '&amp;pound; cosmicbdog PHP Forum 3 Dec 1st, 2007 03:54
[SOLVED] the Main Content div of my template breaks when I type a long text kee2ka4 Web Page Design 2 Nov 9th, 2007 11:26
They are taking legal action littlebilly Starting Out 21 Sep 23rd, 2007 14:03
isn't this taking a bit too long...? tameem Web Page Design 2 May 6th, 2007 08:21
WHY IS THIS SCRIPT TAKING SO LONG!!! benbacardi Classic ASP 3 Aug 28th, 2004 20:02


All times are GMT. The time now is 05:43.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43