PDA

View Full Version : SQLitemanager


luke
05-21-2009, 07:24 PM
hi,

if i click on the WAMP icon on the bottom right of the desktop, and click SQLitemanager, it opens http://localhost/sqlitemanager/ and i dont get how you create the database.

Name:
Version:

then theres a blank text box with browse button next to it

Path:

Then another text box with no browse button

save button



help please :(

Luke.

davidj
05-21-2009, 10:39 PM
use this instead

http://sqlmanager.net/products/mysql/manager

near the bottom of the page there is a freeware version

luke
05-22-2009, 06:51 AM
will try that.

thnx

luke
05-24-2009, 11:18 AM
on the tutorials.. http://www.dreamweaverclub.com/vtm/php-login-script.php

i have just done part 2, but get an error,

Phase error: syntax error, unexpected ';' in C:\wamp\www\php\welcome.php on line 8

so i have looked and it is the line that says:
header("location:login.php");

if i take the ; away then i get this error

Phase error: syntax error, unexpected T_EXIT in C:\wamp\www\php\welcome.php on line 9

which is the line under it that says
exit;

any help??


luke

luke
05-24-2009, 11:20 AM
code is:

<?php
require_once("connection.php");
session_start();
if (! isset($_SESSION['id'])) (
header("location:login.php");
exit;
)
$id = $_SESSION['id']
$query = sprintf("SELECT * FROM users where user_id='$id' ");
$result = @mysql_query($query);
$rowAccount = @mysql_fetch_array($result);

?>
<!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=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
Welcome to my application <?php echo $rowAccount['user_name'];?>
</body>
</html>

davidj
05-24-2009, 11:45 AM
read the error!

what does it say?

You need to terminate the line here...


$id = $_SESSION['id']; //<< notice the semicolon

luke
05-24-2009, 12:04 PM
that code has no spaces betwee the lines so the line numers are different. the one it is on abut is
header("location:login.php");
exit;



and it says unexpected ';'

davidj
05-24-2009, 12:08 PM
please just follow my instruction

luke
05-24-2009, 12:15 PM
ok..

same error.

davidj
05-24-2009, 12:17 PM
is the code you posted from the welcome.php page?

luke
05-24-2009, 12:21 PM
yupp



luke

davidj
05-24-2009, 12:26 PM
that error is not related to the code you posted

you are either not posting the correct code or you have something missing

The only error in that code you posted was the missing semicolon.

Have you uploaded that to the server?

luke
05-24-2009, 12:38 PM
read this:


<?php
require_once("connection.php");
session_start();
if (! isset($_SESSION['id'])) (
header("location:login.php");
exit;
)
$id = $_SESSION['id'];
$query = sprintf("SELECT * FROM users where user_id='$id' ");
$result = @mysql_query($query);
$rowAccount = @mysql_fetch_array($result);

?>

<!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=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
Welcome to my application <?php echo $rowAccount['user_name'];?>
</body>
</html>


that is my welcome.php page code.

i go onto this on the computer with WAMP instaled and it says:

Pahse error: syntax error, unexpected ';' in C:wamp\www\php\welcome.php on line 8

this line, on the code on the machine, not this code here because there is blank lines betwen a couple of lines on the code on the machine, which there is no up there ^^

the line is

header("location:login.php");

so it is saying that is does not expect the ; at the end.

so if i get rid of it, this error comes up

Pahse error: syntax error, unexpected T_EXIT in C:wamp\www\php\welcome.php on line 9

which again is not the line 9 on the code i posted.

an yes the semi colon you sed to put on was missing but it sed UNEXPECTED, if it knew it was missing it would have said ';' is expected



get it? lol

davidj
05-24-2009, 12:39 PM
is that a fresh copy and paste of your current code?

luke
05-24-2009, 12:41 PM
yes it iss

davidj
05-24-2009, 12:45 PM
teamviewer

davidj
05-24-2009, 12:56 PM
replaced () with {} in conditional statement

luke
05-25-2009, 05:27 PM
replaced () with {} in conditional statement

thanks ;) was difficult to tell what it is on the video

davidj
05-25-2009, 05:30 PM
yes

your not the first to make this mistake but I'm sure i vocally describe them when explaining the syntax