Page 2 of 2

Posted: Mon May 21, 2007 6:21 pm
by Grim...
You can use => in an array, though.

Posted: Tue May 22, 2007 1:20 am
by Weirdan
Grim..., APJ Image

Short tag issues

Posted: Tue May 22, 2007 9:21 am
by Johnnyjoe2000
feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


I have in fact been using short tags in some places.  And switching the <? to the <?php tag did clear up some of the lesser display issues.  However I am still having issues with the querys.

If I change the <? to <?php in the following code the page fails to display at all.  No error, no page not found.  Just a plain white page.  If I leave the short tag it gets to the $db->query($sSQL); line and just returns everything after the ">" as plain text as if it closed the PHP script at that point.

Any ideas?

Code: Select all

<?
function ListMembers($temp)
	{
	global $db;
	$sSQL = "";
	$sSQL =	"select	member_id,member_first_name,member_last_name,,website_url " . 
	"from members 
	 Where club_status_id=3 
	and member_last_name LIKE '" . chr($temp) . "%'
	Order By	member_last_name ASC";
	//print $sSQL . "<br>";
	$db->query($sSQL);
	 
	$next_record = $db->next_record();
	while($next_record)
	{?>

feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Posted: Tue May 22, 2007 10:23 am
by RobertGonzalez
Blank pages are almost a sure sign of parse errors. Add this to the beginning of that page and run it again, though looking at your error logs will provide more information. Also note that a parse error may still render a white blank page using these directives:

Code: Select all

<?php
ini_set('error_reporting', E_ALL);
ini_set('display_errors', 1);

// the rest of the script
?>

Posted: Tue May 22, 2007 11:18 am
by Chris Corbyn

Code: Select all

$next_record = $db->next_record();
        while($next_record)
        {?>
Can we see the rest of this loop? From what I see here it appears that loop would never end.