Ok.
Thanks.
Funny enough one of my first stuff-ups was that I didn't initially realise
that all three different types of parentheses, brackets, and braces were
being used since I was sort of listening for cues as opposed to listening to
specific details, and I suppose this is pretty much related.
I know that one or two of the editing programs I use can in fact sort of do
'matches' for opening and closeing braces {}, and maybe they can then also
double-check for ones that then don't having matching ones or something.
Anyway, thanks again - will fix it and go on from there...
Stay well
Jacob Kruger
Blind Biker
Skype: BlindZA
'...Fate had broken his body, but not his spirit...'
----- Original Message -----
From: "Jarrett Meyer" <
jmtmeyer@xxxxxxxxx>
To: "Jacob Kruger" <
jacobk@xxxxxxxxxxx>
Cc: <
php-windows@xxxxxxxxxxxxx>
Sent: Thursday, January 10, 2008 4:59 PM
Subject: Re: Strange error in a very simple PHP file
No matching "}" for segment started on line 8...
Jacob Kruger wrote:
Well, 'looked' through the file, and haven't found anything like a
missing ; or ?> so I dunno.
Here's the full source thereof (maybe I'm actually 'missing' something
due to my screenreader not 'seeing' it or something - LOL!)
---start of source---
<?php session_start(); ?>
<!doctype html public "-//W3C//DTD HTML 4.0 //EN">
<html>
<head>
<title>Backend</title>
<?php
if (array_key_exists("btnGo", $_POST))
{
//echo "here you go...";
if ($_POST("admPass")=="adminpassword")
{
$_SESSION["admin"] = "true";
// echo "<script
type=\"text/javascript\">window.location=\"main.php\";</script>";
RedirectURL("main.php");
}
function RedirectURL($url)
{ // This calls javascript
$redir = "<script
language=\"javascript\">location.href=\"$url\"</script>\n";
return $redir;
}
?>
</head>
<body>
<form method="post" action="index.php" enctype="multipart/form-data"
name="form1">
<table align="center" border="0">
<tr>
<th align="center" colspan="2">
Log-in
</th>
</tr>
<tr>
<th align="right">Password</th>
<td><input type="password" name="admPass" size="50" /></td>
</tr>
<tr>
<th align="center" colspan="2"><input type="submit" name="btnGo"
value="Go" /></th>
</tr>
</table>
</form>
</body>
</html>
---end of source---
Like I said, the line it seems to reckon the problem is on is that very
last line, but it makes sense that the PHP renderer engine thinks it's
just missing something by then - who knows...
Thanks in advance
Jacob Kruger
Blind Biker
Skype: BlindZA
'...Fate had broken his body, but not his spirit...'
----- Original Message ----- From: "Jarrett Meyer" <
jmtmeyer@xxxxxxxxx>
To: "Jacob Kruger" <
jacobk@xxxxxxxxxxx>
Cc: <
php-windows@xxxxxxxxxxxxx>
Sent: Thursday, January 10, 2008 4:10 PM
Subject: Re: Strange error in a very simple PHP file
In my experience, it probably means that you're missing a closing brace
or the semicolon on the very last line of PHP code.
Jacob Kruger wrote:
In a very simple .php file where you're basically supposed to enter a
password to then log-on to the backend of a site, I'm getting a very
strange error:
Parse error: syntax error, unexpected $end in
C:\wamp\www\blindza\admin\index.php on line 43
Line 43 actually only has the text "</html>" on it (without the
quotes).
<snip>
--
Jarrett M. T. Meyer
jmtmeyer@xxxxxxxxx
--
PHP Windows Mailing List (
http://www.php.net/)
To unsubscribe, visit:
http://www.php.net/unsub.php
--
Jarrett M. T. Meyer
jmtmeyer@xxxxxxxxx
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php