set data to table tag
Posted: Sun Nov 27, 2005 11:20 pm
i want to set some words to <Td> tag. is it possible?
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
<form id=frmlogin method=post action=automobile.php>
<table cellspacing=0 cellpadding=3 border=0 style="border:1px solid #e0e0e0">
[color=red]<tr><td ID=err></td></tr>[/color]
<tr>
<Td class=title colspan=2 bgcolor=#F1C660>Login (Member Only)</td>
</tr>
<Tr>
<Td class=text bgcolor=#F6E4B8>Member ID:</td>
<td bgcolor=#F6E4B8><input type=text id=memberid name=memberid></td>
</tr>
<Tr>
<Td class=text bgcolor=#F6E4B8>Password:</td>
<td bgcolor=#F6E4B8><input type=password name=password></td>
</tr>
<tr>
<Td bgcolor=#F6E4B8></td>
<Td bgcolor=#F6E4B8>
<input type="hidden" name="action" value="submitted" />
<input type=submit name=submit value="login" class="button" style="width:50px"></td>
</table>
</form>n00b Saibot wrote:can we have a lil more detail, if you please
Code: Select all
<?php
if(isset($_POST['memberid'])):
$MemID = $_POST['memberid'];
$Pass = $_POST['password'];
/* ...validate here... */
if($MemID == 'real id' && $Pass == 'real pass')
//redirect to member home page...
else $Err = "Invalid Username/Password!"
?>
<td class="Err"><?php echo $Err ?></td>n00b Saibot wrote:you can do something like this...Code: Select all
<?php if(isset($_POST['memberid'])): $MemID = $_POST['memberid']; $Pass = $_POST['password']; /* ...validate here... */ if($MemID == 'real id' && $Pass == 'real pass') //redirect to member home page... else $Err = "Invalid Username/Password!" ?> <td class="Err"><?php echo $Err ?></td>
n00b Saibot wrote:ASP or ASP.NET can access the TD tag technically speaking. They can output inside a TD tag but they can't `access` the TD tag runtime... If you want to access TD tag at runtime then you will have to use JS+DOM scripting.
this is what I've done in my snip I gave you...jaylin wrote:so, for php, how can i output the text to tg tag.
Code: Select all
<td class="Err"><?php echo $Err ?></td>