Php newbie pls help me debug my code tnx
Posted: Wed May 24, 2006 7:26 pm
I'm having problems with the syntax Please check my code:
THe browser returned: Parse error: parse error, unexpected '.' in C:\Program Files\Apache Group\Apache2\htdocs\generate.php on line 23
Burrito: Please use
Code: Select all
<?
include("conf/config.php");
$link = mysql_connect($database['host'],$database['username'],$database['password']);
mysql_select_db($database['name'],$link);
$rs4 = mysql_query("SELECT IP4 FROM ipadd ORDER BY IP4")or die(mysql_error());
$info4 = (mysql_fetch_array( $rs4 ));
$ctr=31;
if ($ctr != 31) {//if ctr is equal to the 1st value of IP4 field in the database
Print "<b>The IP is available:</b> ".$info4['IP4']. " <br>";
}
else
{
Print "<b>IP4:</b> ".$info4['IP4']. " <br>";
while($info4 = mysql_fetch_array( $rs4 ))
{
$ctr++;
if (ctr==.$info4['IP4'].) //Line 23
{
Print $ctr;
}
Print "<b>IP4:</b> ".$info4['IP4'] . " <br>";
Print $ctr;
}
}
?>Burrito: Please use
Code: Select all
and/orCode: Select all
tags when [url=http://forums.devnetwork.net/viewtopic.php?t=21171]posting code in the forum[/url].[/size]