Reply to Re: unexpected }

Your name:

Reply:


Posted by Jim Michaels on 11/24/07 04:30

Jim Michaels wrote:
> <?php
> include 'header.php';
> $_SESSION['minutes']=(int)(ini_get("session.gc_maxlifetime")/60);
> ?><!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" />
> ...blah...</head>
>
> <body>
> <div class="heading">Quiz</div>
> <?php
> //must have just typed in the URL.
> if (!isset($_SESSION['uid']) && !isset($_SESSION['battery_id'])) {
> ?>
> <br /><!--needed because of padding in span -->
> <span class="needaccount">You need to register before you can take a
> test.</span><br />
> <br />
> <a href="userlogin.php">Login</a><br />
> <a href="ucreateacct.php">Register</a><br />
> <?

and there's the culprit. <? instead of <?php
I knew it was not a bracket or quote problem. dreamweaver covers quotes
by making mistakes very visible. the tool I wrote covers brackets. but
dw is supposed to handle generic PHP code, therefore it displays <? the
same as <?PHP. I think this should be an option, because it could make
the difference between your code running or not running - not every
server has short_tags enabled.

and after running the code with the session variables in place, I find
it is still quite buggy due to discovering something very important
missing... time for a rewrite/rethink. ugh. what was I thinking?

anyway, thanks for the help. I wouldn't have gotten this far without a
2nd pair of eyes. thanks again.
------------------------------------
Jim Michaels
for email, edit the address

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация