0

What is wrong with the "update" row :-O.... it is showing some syntax error !! plz sombody rply soon !!!!!!

$sql="SELECT * FROM contact";
$result=mysql_query($sql);?>
<table align="center" width="700" border="0"><tr><td><?php
echo "<form name='form1' method=post action=''>"; 
echo "<table border='0' cellspacing='0' cellpadding='2' width='600' align='center'>"; 
echo"<tr bgcolor='#ffffff'>";
echo"<td>&nbsp;</td>";
echo"<td align='center' bgcolor='#FFFFFF'><strong>emailid</strong></td>";
echo"<td align='center' bgcolor='#FFFFFF'><strong>forwarding</strong></td>";
echo"<td align='center' bgcolor='#FFFFFF'><strong>autoresponse</strong></td>";
echo"<td align='center' bgcolor='#FFFFFF'><strong>company</strong></td>";
echo"<td align='center' bgcolor='#FFFFFF'><strong>Password</strong></td>";
echo"<td align='center' bgcolor='#FFFFFF'>UPDATE</td></tr>";
while($rows=mysql_fetch_array($result)){

echo"<tr bgcolor='#ffffff'>";
echo"<td>";
echo"<input type = 'checkbox' name='box[]' value=\"".$rows['emailid']."\"'</td>";
echo"<td align='center' bgcolor='#FFFFFF'>".$rows['emailid']."</td>";
echo"<td align='center' bgcolor='#FFFFFF'>".$rows['forwarding']."</td>";
echo"<td align='center' bgcolor='#FFFFFF'>".$rows['autoresponse']."</td>";
echo"<td align='center' bgcolor='#FFFFFF'>".$rows['company']."</td>";
echo"<td align='center' bgcolor='#FFFFFF'>".$rows['password']."</td>";
echo"<td>"<a href=\"update.php?emailid=<? echo ".$rows['emailid']."; ?>\">update</a></td></tr>";
}

?>
4
Contributors
10
Replies
11
Views
6 Years
Discussion Span
Last Post by richieking
Featured Replies
  • Hi, [CODE]$sql="SELECT * FROM users"; $result=mysql_query($sql);?> <table align="center" width="700" border="0"><tr><td><?php echo "<form name='form1' method=post action=''>"; echo "<table border='0' cellspacing='0' cellpadding='2' width='600' align='center'>"; echo"<tr bgcolor='#ffffff'>"; echo"<td>&nbsp;</td>"; echo"<td align='center' bgcolor='#FFFFFF'><strong>emailid</strong></td>"; echo"<td align='center' bgcolor='#FFFFFF'><strong>forwarding</strong></td>"; echo"<td align='center' bgcolor='#FFFFFF'><strong>autoresponse</strong></td>"; echo"<td align='center' bgcolor='#FFFFFF'><strong>company</strong></td>"; echo"<td align='center' bgcolor='#FFFFFF'><strong>Password</strong></td>"; echo"<td align='center' bgcolor='#FFFFFF'>UPDATE</td></tr>"; while($rows=mysql_fetch_array($result)){ echo"<tr bgcolor='#ffffff'>"; echo"<td>"; echo"<input type = … Read More

  • Short tags can definitely be disabled, however they are enabled by default. If they are disabled, there are ways to use a stream wrapper to replace <?= to <?php echo on the the fly, but its merely a workaround. [URL="http://php.net/manual/en/ini.core.php"]RTM[/URL] Read More

1

Hi,

$sql="SELECT * FROM users";
$result=mysql_query($sql);?>
<table align="center" width="700" border="0"><tr><td><?php
echo "<form name='form1' method=post action=''>"; 
echo "<table border='0' cellspacing='0' cellpadding='2' width='600' align='center'>"; 
echo"<tr bgcolor='#ffffff'>";
echo"<td>&nbsp;</td>";
echo"<td align='center' bgcolor='#FFFFFF'><strong>emailid</strong></td>";
echo"<td align='center' bgcolor='#FFFFFF'><strong>forwarding</strong></td>";
echo"<td align='center' bgcolor='#FFFFFF'><strong>autoresponse</strong></td>";
echo"<td align='center' bgcolor='#FFFFFF'><strong>company</strong></td>";
echo"<td align='center' bgcolor='#FFFFFF'><strong>Password</strong></td>";
echo"<td align='center' bgcolor='#FFFFFF'>UPDATE</td></tr>";
while($rows=mysql_fetch_array($result)){

echo"<tr bgcolor='#ffffff'>";
echo"<td>";
echo"<input type = 'checkbox' name='box[]' value=\"".$rows['emailid']."\"'</td>";
echo"<td align='center' bgcolor='#FFFFFF'>".$rows['emailid']."</td>";
echo"<td align='center' bgcolor='#FFFFFF'>".$rows['forwarding']."</td>";
echo"<td align='center' bgcolor='#FFFFFF'>".$rows['autoresponse']."</td>";
echo"<td align='center' bgcolor='#FFFFFF'>".$rows['company']."</td>";
echo"<td align='center' bgcolor='#FFFFFF'>".$rows['password']."</td>";
echo"<td><a href=\"update.php?emailid=".$rows['emailid']."\">update</a></td></tr>";
}

In PHP, Be aware of the single and double quotes when using in your code.

types.string

Edited by paulrajj: n/a

0

paulrajj----------Thank u so so so so so so soooo much :).. i was eating my head since morning for this !! :(

0

And make things easier for your self in the future.

learn how to insert php quick tags in html.

Very handy :)

0
[form]
[input type='text' name='username' value='<?=$value?>']


[/form]

The little php snippet inside the form input value.

Are you getting the idea??
:)

Edited by richieking: n/a

0

Hold your breath,

Php tag <?=$foo?> can not be turn off.

this is not asp tag
<% ... %>

Trust me i host up to 468 customers website on my server and i know that any hosting company turning this off will be out of business in 2 minutes.

The php short tags are always available on default. The asp type is optional

;) explore

Edited by richieking: n/a

0

richieking

u seem 2 be an expert in PHP :O .. plz plz plz be there 4 me always :( .. m a newcomer in php .. and dat 2 in a job :/

1

Short tags can definitely be disabled, however they are enabled by default.

If they are disabled, there are ways to use a stream wrapper to replace <?= to <?php echo on the the fly, but its merely a workaround.

RTM

0

Yes but they are not and wont be disabled by php.

Lets set the record straight. The short tags are one of php selling point.

And no web hosting services will dare to disable that. The short and long tag of php are php.

The asp style is only to show off. Its not part of php core.

explore :)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.