Posted: Thu Oct 05, 2006 10:54 am
SWEET!!! thanx goatThe Ninja Space Goat wrote:As for a PHP editor... syntax highlighting will prevent 99% of parse errors... here's a free one that's pretty decent:
http://crimsoneditor.com/
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
SWEET!!! thanx goatThe Ninja Space Goat wrote:As for a PHP editor... syntax highlighting will prevent 99% of parse errors... here's a free one that's pretty decent:
http://crimsoneditor.com/
Code: Select all
session_start();
ini_set('error_reporting', E_ALL);
ini_set('display_errors', 1);Code: Select all
<div style=\"padding-left:17px; padding-top:20px;\"><?php echo "$_SESSION['logname']welcome to the
secret page!"; ?></div>and then this wayParse error: parse error, unexpected T_VARIABLE in C:\Program Files\xampp\htdocs\Log_In\agent\index_new.php on line 43
Code: Select all
<div style=\"padding-left:17px; padding-top:20px;\">$_SESSION['logname']welcome to the secret
page!</div>is there a different way of going about this that i should be using?Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in C:\Program Files\xampp\htdocs\Log_In\agent\index_new.php on line 43
Code: Select all
echo $_SESSION['logname'];
// but
echo "... $_SESSION[logname] ...";
// or
echo "... {$_SESSION['logname']} ...";
// or
$tmp = $_SESSION['logname'];
echo <<< eot
yadda yadda
yadda $tmp yadda
eot;You never open another php block within another php block.Obadiah wrote:Code: Select all
<div style="padding-left:17px; padding-top:20px;"><?php echo "$_SESSION['logname']welcome to the secret page!"; ?></div>
Code: Select all
<html>
<head>
<title>Secret Page</title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
<?php echo $display_block; ?>
</body>
</html>wel well... you learn something every day... thanks volka.volka wrote:within double-quoted strings you can either leave the ' out or encapsulate the whole term with { }
Code: Select all
//i hate trying to wing this stuff but its the only way i know how to explain what im tryna do
$next_program = ($sql = "SELECT user_name FROM $table_name
WHERE user_name='$_POST[fusername]' ==_SESSION['logname']";"/Credit_Info.php";)I don't understand; you're mixing php and html alreadyObadiah wrote:i thought that was the reason one would use display block....to send blocks of html in a php script for viewing in the browser....should i have used just echo?
Code: Select all
<html>
<head>
<title>Secret Page</title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
<?php echo $display_block; ?>
</body>
</html>Code: Select all
<?php session_start(); ?>
<html>
<head>
<title>Secret Page</title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
[... html code ...]
<td valign="top" width="208" height="302">
<div style="padding-left:17px; padding-top:20px">
<?php echo $_SESSION['logname']; ?>welcome to the secret page!
</div>
<div style="padding-left:22px; padding-top:19px">
<img src="images/2_p1.gif" alt="">
</div>
[... html code ...]
</body>
</html>ok...imagin you were a independent sales contracter and you wanted to login to this site to see yourThe Ninja Space Goat wrote:why take him to his own folder... why not just take him to a template that gets filled in with is data from a database?
Code: Select all
<a href="{$_SESSION['logname']}"report.pdf">Code: Select all
<a href=\"{$_SESSION['logname']}\"report.pdf\">Code: Select all
session_destroy();