set data to table tag
Moderator: General Moderators
set data to table tag
i want to set some words to <Td> tag. is it possible?
- n00b Saibot
- DevNet Resident
- Posts: 1452
- Joined: Fri Dec 24, 2004 2:59 am
- Location: Lucknow, UP, India
- Contact:
i just want to post some message if the login user is invalid.
i want to give the error message on the <Td> tag err
plz help me
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>plz help me
n00b Saibot wrote:can we have a lil more detail, if you please
- n00b Saibot
- DevNet Resident
- Posts: 1452
- Joined: Fri Dec 24, 2004 2:59 am
- Location: Lucknow, UP, India
- Contact:
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>ya. good idead. but, i just wonder why php can't access the td tag like asp or asp.net?
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
- DevNet Resident
- Posts: 1452
- Joined: Fri Dec 24, 2004 2:59 am
- Location: Lucknow, UP, India
- Contact:
- n00b Saibot
- DevNet Resident
- Posts: 1452
- Joined: Fri Dec 24, 2004 2:59 am
- Location: Lucknow, UP, India
- Contact:
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>