Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 10-03-2004, 03:21 PM plz help me
Junior Talker

Posts: 3
Trades: 0
im using a login the login code is as follows -==-
PHP Code:
<?php require_once('Connections/localhost.php'); ?>
<?php
// *** Validate request to login to this site.
session_start();

$loginFormAction $_SERVER['PHP_SELF'];
if (isset(
$accesscheck)) {
  
$GLOBALS['PrevUrl'] = $accesscheck;
  
session_register('PrevUrl');
}

if (isset(
$_POST['username'])) {
  
$loginUsername=$_POST['username'];
  
$password=$_POST['password'];
  
$MM_fldUserAuthorization "";
  
$MM_redirectLoginSuccess "login.php";
  
$MM_redirectLoginFailed "index.php";
  
$MM_redirecttoReferrer true;
  
mysql_select_db($database_localhost$localhost);
  
  
$LoginRS__query=sprintf("SELECT username, password FROM logon WHERE username='%s' AND password='%s'",
    
get_magic_quotes_gpc() ? $loginUsername addslashes($loginUsername), get_magic_quotes_gpc() ? $password addslashes($password)); 
   
  
$LoginRS mysql_query($LoginRS__query$localhost) or die(mysql_error());
  
$loginFoundUser mysql_num_rows($LoginRS);
  if (
$loginFoundUser) {
     
$loginStrGroup "";
    
    
//declare two session variables and assign them
    
$GLOBALS['MM_Username'] = $loginUsername;
    
$GLOBALS['MM_UserGroup'] = $loginStrGroup;          

    
//register the session variables
    
session_register("MM_Username");
    
session_register("MM_UserGroup");

    if (isset(
$_SESSION['PrevUrl']) && true) {
      
$MM_redirectLoginSuccess $_SESSION['PrevUrl'];    
    }
    
header("Location: " $MM_redirectLoginSuccess );
  }
  else {
    
header("Location: "$MM_redirectLoginFailed );
  }
}
?>
click for image
which do i need to use?? and what is the varibal from the first code bloke above ????


Thnaks ??
ben_pillok is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 10-03-2004, 05:03 PM
someotherguy582's Avatar
Average Talker

Posts: 21
Trades: 0
I dont get what you are asking. And I wouldnt recomend using DW for PHP editing. DW modifies your code w/o you knowing.
someotherguy582 is offline
Reply With Quote
View Public Profile Visit someotherguy582's homepage!
 
Old 10-04-2004, 02:48 PM
Gaffer Sports's Avatar
Ultra Talker

Posts: 397
Name: Steve
Location: Scotland
Trades: 1
Quote:
Originally Posted by someotherguy582
I dont get what you are asking. And I wouldnt recomend using DW for PHP editing. DW modifies your code w/o you knowing.
Dreamweaver does not insert unwanted code if you use it as a php editor, it only adds extras if you use it in design mode and these are generally style additions.
Gaffer Sports is offline
Reply With Quote
View Public Profile Visit Gaffer Sports's homepage!
 
Old 10-06-2004, 05:39 AM
Junior Talker

Posts: 3
Trades: 0
As long as you have all of your settings properly done and use only the code view of dreamweaver it won't add anything into your code that you don't want. I've been using Dreamweaver for my coding of PHP, ASP, JSP, and XHTML and my code always looks just as I typed it in (I frequently open my files in Notepad as well to make quick changes).
fallenrayne is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to plz help me
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.66502 seconds with 12 queries