Jump to content

lingo5

Members
  • Posts

    426
  • Joined

  • Last visited

About lingo5

  • Birthday 04/21/1992

Profile Information

  • Gender
    Female
  • Location
    Spain
  • Age
    20

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

lingo5's Achievements

Regular Member

Regular Member (3/5)

3

Reputation

  1. I'm back !!!!!

  2. thanks all!!... I have used CPD's code to sort this out. I did't know using $_SERVER was not safe....thanks for pointing that out. ...and yes Funster...I'm a grl
  3. Hi, I have this variable that checks which page we're on: <?php $checkit = $_SERVER['PHP_SELF']; ?> and I need to echo some text depending which page we're on. I am using this code to do so: <?php if ($checkit=="index.php") { echo "this is the home page"; } if ($checkit=="index2.php") { echo "this is the other page"; }?> ...but nothing is printed. what am i doing wrong? Thanks
  4. thanks Pikachu, I'm loking at that.
  5. Thanks Peter_anderson, but by doing that styles are not applied to te email. I would like to be able to send a styled message using my own style sheet. How can I do that?...
  6. I have one more question about this, can I insert html code in my email?, I have tried like this: $strMessage = "<table width="450" border="0" cellspacing="0" cellpadding="4"> <tr> <td><span class="NoResultsTXT2">Dear Administrator,</span></td> </tr> <tr> <td><span class="NoResultsTXT2">the following distributor</span></td> </tr> <tr> <td><span class="precioVenta">$row_admin_login_RS['distributor_company_name']</span></td> </tr> <tr> <td><span class="NoResultsTXT2">Has modified his Distributor information record. </span></td> </tr> </table>"; But I get this error "Parse error: syntax error, unexpected T_LNUMBER in /usr/home/eu45antifoul.com/web/distributors/DIST_distributors_update.php on line 216"
  7. oh...I see... I was getting a 500 error. Thanks for your help, it works great.
  8. Hi, I am trying to insert a variable in the body of an email lik so: $message = "Dear Administrator,\n\nthe following distributor\n\n'.$row_admin_login_RS['distributor_company_name'].'\n\nHas modified his Distributor information record.\n\"; I know it must be a syntax error...but I can't figure it out. Thanks
  9. Hi, I have created a login script that creates a user id session from the user email, like so: // *** 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['distributor_email'])) { $loginUsername=$_POST['distributor_email']; $password=$_POST['distributor_password']; $MM_fldUserAuthorization = ""; $MM_redirectLoginSuccess = "DIST_main.php"; $MM_redirectLoginFailed = "index.php?failed=true"; $MM_redirecttoReferrer = false; mysql_select_db($database_MySQLconnect, $MySQLconnect); $LoginRS__query=sprintf("SELECT distributor_email, distributor_password FROM t_distributors WHERE distributor_email=%s AND distributor_password=%s", GetSQLValueString($loginUsername, "text"), GetSQLValueString($password, "text")); $LoginRS = mysql_query($LoginRS__query, $MySQLconnect) 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']) && false) { $MM_redirectLoginSuccess = $_SESSION['PrevUrl']; } header("Location: " . $MM_redirectLoginSuccess ); $datetime = date("Y-m-d H:i:s",time()); $query = "UPDATE mydatabase.t_distributors SET distributor_lastlogin= '$datetime' WHERE distributor_email='$loginUsername'"; $result = mysql_query($query) or die(mysql_error()); } else { header("Location: ". $MM_redirectLoginFailed ); } } This works fine, but I need to create one more session to store the Company name of the logged in user. I am struggling to do this as I am new to sessions. Any help much appreciated.
×
×
  • 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.