School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 300,362 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,489 people online right now. Registration is fast and FREE... Join Now!




create a user log in with dreamweaver CS4 with php mysql

 

create a user log in with dreamweaver CS4 with php mysql, Parse error: parse error in C:\wamp\www\login.php on li

deschan

14 Jun, 2009 - 01:31 AM
Post #1

New D.I.C Head
*

Joined: 14 Jun, 2009
Posts: 21

Dear All,

what is my error? when i run test, show this > Parse error: parse error in C:\wamp\www\login.php on line 2

Following is my code for log in page:

Attached File  login.php ( 2.67k ) Number of downloads: 68

CODE

<?php
@@UrlFormat@@('Connections/inserting.php');

// *** Start the session
if (!session_id()) session_start();
// *** Validate request to log in to this site.
$FF_LoginAction = $HTTP_SERVER_VARS['PHP_SELF'];
if (isset($HTTP_SERVER_VARS['QUERY_STRING']) && $HTTP_SERVER_VARS['QUERY_STRING']!="") $FF_LoginAction .= "?".htmlentities($HTTP_SERVER_VARS['QUERY_STRING']);
if (isset($HTTP_POST_VARS['textfield'])) {
  $FF_valUsername=$HTTP_POST_VARS['textfield'];
  $FF_valPassword=$HTTP_POST_VARS['textfield2'];
  $FF_fldUserAuthorization="";
  $FF_redirectLoginSuccess="welcome.html";
  $FF_redirectLoginFailed="noway.html";
  $FF_rsUser_Source="SELECT username, password ";
  if ($FF_fldUserAuthorization != "") $FF_rsUser_Source .= "," . $FF_fldUserAuthorization;
  $FF_rsUser_Source .= " FROM members WHERE username='" . $FF_valUsername . "' AND password='" . $FF_valPassword . "'";
  mysql_select_db($database_inserting, $inserting);
  $FF_rsUser=mysql_query($FF_rsUser_Source, $inserting) or die(mysql_error());
  $row_FF_rsUser = mysql_fetch_assoc($FF_rsUser);
  if(mysql_num_rows($FF_rsUser) > 0) {
    // username and password match - this is a valid user
    $MM_Username=$FF_valUsername;
    session_register("MM_Username");
    if ($FF_fldUserAuthorization != "") {
      $MM_UserAuthorization=$row_FF_rsUser[$FF_fldUserAuthorization];
    } else {
      $MM_UserAuthorization="";
    }
    session_register("MM_UserAuthorization");
    if (isset($accessdenied) && false) {
      $FF_redirectLoginSuccess = $accessdenied;
    }
    mysql_free_result($FF_rsUser);
    session_register("FF_login_failed");
    $FF_login_failed = false;
    header ("Location: $FF_redirectLoginSuccess");
    exit;
  }
  mysql_free_result($FF_rsUser);
  session_register("FF_login_failed");
  $FF_login_failed = true;
  header ("Location: $FF_redirectLoginFailed");
  exit;
}
?>
<!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>
</head>

<body><form action="<?php echo $FF_LoginAction?>" METHOD="POST" name="logthemin" id="logthemin">

<table width="250" border="1" cellspacing="4" cellpadding="4">
<tr>
<td width="90">Username:</td>
<td width="126"><label>
<input type="text" name="textfield" />
</label></td>
</tr>
<tr>
<td>Password:</td>
<td><label>
<input type="text" name="textfield2" />
</label></td>
</tr>
<tr>
<td colspan="2"><label>
<input type="submit" name="Submit" value="Login" />
</label></td>
</tr>
</table>

</form>

</body>
</html>


** Edit ** code.gif

This post has been edited by no2pencil: 14 Jun, 2009 - 02:28 AM

User is offlineProfile CardPM
+Quote Post


noorahmad

RE: Create A User Log In With Dreamweaver CS4 With Php Mysql

14 Jun, 2009 - 01:50 AM
Post #2

Webmaster
Group Icon

Joined: 12 Mar, 2009
Posts: 2,018



Thanked: 125 times
Dream Kudos: 1350
My Contributions
code.gif

and change your this code @@UrlFormat@@('Connections/inserting.php');
to
include('Connections/inserting.php')
User is online!Profile CardPM
+Quote Post

deschan

RE: Create A User Log In With Dreamweaver CS4 With Php Mysql

14 Jun, 2009 - 02:17 AM
Post #3

New D.I.C Head
*

Joined: 14 Jun, 2009
Posts: 21

QUOTE(noorahmad @ 14 Jun, 2009 - 01:50 AM) *

code.gif

and change your this code @@UrlFormat@@('Connections/inserting.php');
to
include('Connections/inserting.php')



Dear Noor Ahmad,

Appreciate your advised, after i changed the code you provided me, run test than show anothers error :>Parse error: parse error in C:\wamp\www\login.php on line 5

thanks


Attached File(s)
Attached File  login.php ( 2.67k ) Number of downloads: 15
User is offlineProfile CardPM
+Quote Post

ridersonthestorm

RE: Create A User Log In With Dreamweaver CS4 With Php Mysql

25 Jun, 2009 - 08:19 PM
Post #4

New D.I.C Head
*

Joined: 23 Jun, 2009
Posts: 10

Is there a tutorial that goes along with Dreamweaver for creating user accounts (and adding more as more people are given limited access to enter/edit their data). Also a book that might give me a good start at what I'm trying to do. Any other free software that's out there that might also be helpful?

--thanks, Steve.
User is offlineProfile CardPM
+Quote Post

imacgeek

RE: Create A User Log In With Dreamweaver CS4 With Php Mysql

28 Jul, 2009 - 02:20 PM
Post #5

New D.I.C Head
*

Joined: 28 Jul, 2009
Posts: 1

here it is
require_once("Connection/connection.php") or
include("Connection/connection.php")

There you go

This post has been edited by imacgeek: 28 Jul, 2009 - 02:23 PM


Attached File(s)
Attached File  login2.php ( 2.67k ) Number of downloads: 21
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/7/09 08:13PM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month