Jump to content

Frames In Php


laado

Recommended Posts

i write the following code<?phpecho"<frameset cols="25%,75%"><frame src="left.php"> <frame src="main.php"></frameset>";?>but it gives following errorParse error: syntax error, unexpected T_LNUMBER, expecting ',' or ';' in C:\Program Files\VertrigoServ\www\fram.php on line 3whts wrong?

Link to comment
Share on other sites

sorry, don't put double quotes around things within the echo quotesfor example, '25%,75%'btw, with php, the echo is just what the php is telling to display as html to the web browser

Link to comment
Share on other sites

Thanx for help. now i have another problem related to loginthe code for login is

<?php//Database Information$dbhost = "localhost";$dbname = "news";$dbuser = "phpuser";$dbpass = "phppass";//Connect to databasemysql_connect ( $dbhost, $dbuser, $dbpass)or die("Could not connect: ".mysql_error());mysql_select_db($dbname) or die(mysql_error());session_start();$username = $_POST[‘username’];$password = md5($_POST[‘password’]);$query = “select * from users where username=’$username’ and password=’$password’”;$result = mysql_query($query);if (mysql_num_rows($result) != 1) {$error = “Bad Login”;	include “login.html”;} else {	$_SESSION[‘username’] = “$username”;	include “memberspage.php”;}?>

it gives following errorParse error: syntax error, unexpected T_STRING in C:\Program Files\VertrigoServ\www\example\login.php on line 19 whts wrong in sql statement?

sorry, don't put double quotes around things within the echo quotesfor example, '25%,75%'btw, with php, the echo is just what the php is telling to display as html to the web browser
Link to comment
Share on other sites

You're using the wrong type of quotes, they need to be the "straight" ones.

Link to comment
Share on other sites

now the error comesWarning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\Program Files\VertrigoServ\www\example\login.php on line 24

i change quotes but problem not solved
Link to comment
Share on other sites

now the error comesWarning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\Program Files\VertrigoServ\www\example\login.php on line 24

You're using the wrong type of quotes, they need to be the "straight" ones.
Link to comment
Share on other sites

now the error comesWarning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\Program Files\VertrigoServ\www\example\login.php on line 24line 24 is if (mysql_num_rows($result) !=1) {

$query = "select * from users where username='".$username."' and password='".$password."'";
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...