Jump to content

devvie

New Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

devvie's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Akr, i use dreamweaver but i got this code from hotscripts i believe about that businessman, you notice its NOT the first line of code, its like the 30th.....  look at my php code ont he top of this post.  would you consider the session start to be the first line of code in that example?  if so, then i am really confused.  Or, is that the problem, where the session start shoudl be on LINE1???
  2. would someone have any idea where i could get a classified script that is versatile and will cover real-estate, auto's and misc. items that is professional? i will start with the free ones but not opposed to paying for one if i can test out the demo first. This is the single biggest issue at hand here, is trying to come up with a expandable platform to run a classifieds ads site on. p.s i have already scraped hotscripts Any suggestions, no matter how small, would be greatly helpful and appreciated. arrgghh
  3. Ken, i wouldnt have understood it completely anyway, but now looking back on it, thanks for the link, becuase it starting to make more sense. I really dont understand  what headers are yet.  I read chapters of php everyday, so its coming more clear, but headers are still mystery for the most part. redarrow, whats teh code you sent me, it looks like its a direct copy from my page.  can you give a comment with your post? if (isset($_SESSION['PrevUrl']) && true) {       $MM_redirectLoginSuccess = $_SESSION['PrevUrl'];     }     header("Location: " . $MM_redirectLoginSuccess );   }   else {     header("Location: ". $MM_redirectLoginFailed );   } }
  4. you know i read soemthing about a cache limiter recently, and i never activated it(if necessary), or payed any attention it, and i notice that in the error message. could this be it? BUT, it also says session headers already started, so might i need to do a session destroy or unset first?
  5. thats where the bugger comes in, there is no line 12, heres teh complete lines, thats it.  10 lines <?php # FileName="Connection_php_mysql.htm" # Type="MYSQL" # HTTP="true" $hostname_forsale = "localhost"; $database_forsale = "db"; $username_forsale = "user"; $password_forsale = "pass"; ?>
  6. Im getting this message when i load my login page.  its brand new, so i hjave a million directions i can go.  I want a secure login with sessions so that i can remove the logins on other outside apps on the site.  [code]Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/c4sale/public_html/main/Connections/connection.php:12) in /home/c4sale/public_html/main/login.php on line 36 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/c4sale/public_html/main/Connections/connection.php:12) in /home/c4sale/public_html/main/login.php on line 36[/code] heres the header of my page [code]<?php require_once('Connections/connection.php'); ?> <?php if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") {   $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;   $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);   switch ($theType) {     case "text":       $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";       break;        case "long":     case "int":       $theValue = ($theValue != "") ? intval($theValue) : "NULL";       break;     case "double":       $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";       break;     case "date":       $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";       break;     case "defined":       $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;       break;   }   return $theValue; } } ?> <?php // *** Validate request to login to this site. if (!isset($_SESSION)) {   session_start(); } $loginFormAction = $_SERVER['PHP_SELF']; if (isset($_GET['accesscheck'])) {   $_SESSION['PrevUrl'] = $_GET['accesscheck']; } if (isset($_POST['textfield'])) {   $loginUsername=$_POST['textfield'];   $password=$_POST['textfield2'];   $MM_fldUserAuthorization = "";   $MM_redirectLoginSuccess = "user/index.php";   $MM_redirectLoginFailed = "login_deny.php";   $MM_redirecttoReferrer = true;   mysql_select_db($database_forsale, $forsale);     $LoginRS__query=sprintf("SELECT Desired_Username, Password FROM login1_table WHERE Desired_Username=%s AND Password=%s",     GetSQLValueString($loginUsername, "text"), GetSQLValueString($password, "text"));     $LoginRS = mysql_query($LoginRS__query, $forsale) or die(mysql_error());   $loginFoundUser = mysql_num_rows($LoginRS);   if ($loginFoundUser) {     $loginStrGroup = "";         //declare two session variables and assign them     $_SESSION['MM_Username'] = $loginUsername;     $_SESSION['MM_UserGroup'] = $loginStrGroup;           if (isset($_SESSION['PrevUrl']) && true) {       $MM_redirectLoginSuccess = $_SESSION['PrevUrl'];     }     header("Location: " . $MM_redirectLoginSuccess );   }   else {     header("Location: ". $MM_redirectLoginFailed );   } } ?>[/code] and heres the form [code]<form name="form1" method="POST" action="<?php echo $loginFormAction; ?>">     <label>Username<br><input name="textfield" type="text" accesskey="l" tabindex="1" size="15"><br></label><label>Password<br><input name="textfield2" type="password" tabindex="2" size="15"><br></label><input type="submit" name="Submit" value="Submit" tabindex="3"></form>[/code]
×
×
  • Create New...

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.