Page 1 of 1
The most embaressing question ever
Posted: Sat Jun 02, 2007 11:45 am
by thefreebielife
Code: Select all
<tr>
<td height="699" colspan="17" valign="top" background="images/nav_38.gif">
<?
if (isset($_GET['info'])) {
$info = $_GET['info'];
$data = mysql_query("SELECT * FROM users WHERE uId='$info'")
or die(mysql_error());
$r = mysql_fetch_array($data);
$auid=$r["uId"];
$username=$r["username"];
$result2 = mysql_query("select * from users WHERE rid=$uid && ostatus>=1");
$count2=mysql_num_rows($result2);
?>
<table border="1">
<tr>
<td>User</td>
<td>Completed Referrals</td>
</tr>
<tr>
<td><? echo "$username"; ?></td>
<td><? echo "$count2"; ?></td>
</tr>
</table>
</td>
</tr>
im getting an "unexpected end" from this.
i dont see anywhere i didnt end a string, but does anyone see one?
Posted: Sat Jun 02, 2007 12:15 pm
by Weirdan
if (isset($_GET['info'])) {
You haven't closed that block ({ must be paired with })
Posted: Sat Jun 02, 2007 1:43 pm
by onion2k
Unrelated issue... stop using short tags.
Posted: Sun Jun 03, 2007 5:04 am
by s.dot
Another un-related question.
Why is it called short tagS, plural. Only one of them is short.

Posted: Sun Jun 03, 2007 7:25 am
by feyd
It's actually not called short tags. It's called short_open_tag.
Posted: Sun Jun 03, 2007 2:35 pm
by Benjamin
You probably want to close your if statement bracket too.
Unrelated: short tags is an alias to short_open_tag

Posted: Sun Jun 03, 2007 2:50 pm
by Mordred
To add another 2 eurocents to the discussion, a trailing closing tag is optional

Posted: Sun Jun 03, 2007 2:58 pm
by maliskoleather
Mordred wrote:To add another 2 eurocents to the discussion, a trailing closing tag is optional

as another side note, this, along with short_open_tag, and the ASP style tags, will be obsolete in PHP6. the only valid tags will be <?php ?>.
Posted: Sun Jun 03, 2007 4:23 pm
by superdezign
maliskoleather wrote:as another side note, this, along with short_open_tag, and the ASP style tags, will be obsolete in PHP6. the only valid tags will be <?php ?>.
Makes sense to me. It's only three letters.
Any chance PHP6 is going to be cleaning up some of the generally unnecessary backwards compatibility?
Posted: Sun Jun 03, 2007 4:36 pm
by maliskoleather
superdezign wrote:Any chance PHP6 is going to be cleaning up some of the generally unnecessary backwards compatibility?
working on it. most of the php3 type compatibilty is being worked out... hopefully by 6.5 or 7

Posted: Sun Jun 03, 2007 4:39 pm
by superdezign
maliskoleather wrote:working on it. most of the php3 type compatibilty is being worked out... hopefully by 6.5 or 7

Well that doesn't sound like anytime soon.

Good to know they won't be so worried about it though.
Thinking as to how PHP 5 made OOP actually feel like OOP, I can't wait too see what they do with 6. No idea what PHP is missing though, but it seems like people are always coming up with new functions.
Posted: Sun Jun 03, 2007 4:49 pm
by maliskoleather
superdezign wrote:Well that doesn't sound like anytime soon.
honestly, if you look at the history of php, and the rate at which funtions have been added/removed... thats pretty fast.. lol
i could go on for days about the changes coming in php6, and I dont really think that would be appropriate for this thread... but there is a
nice litte review that is mostly right.. and lists most of the cool functions coming.
Posted: Mon Jun 04, 2007 4:54 am
by Luke