i wanna know to make my td tag style visible an getting value from another php page in the form of session varialbe as my code is define under,
on else condition fron php page i am setting session variable and redirecting to another page as,
else {
session_start();
$_SESSION['Validation'] = 'on';
header("Location: index.html");
}
after then on index.html page in between table tag i am using this script as,
<?php
session_start();
$foo = $_GET['Validation'];
echo $foo;
?>
<tr><td colspan=2><font face="verdana,arial" size="-1" color="red" style="visibility:hidden">Wrong username or Password</font></td></tr>
how to make td tag style vissible true and it remain hidden if session variable do not get any value ????
Hopes to listen from you …
Thanks in Advance
use a simple
if... then... elsecondition and make use of your $_SESSION variable to switch those conditions. Create a new variable to hold your current style e.g.$tdStyle = "visibility: hidden;"or$tdStyle = "visibility: visible;"for hiding/showing your td, respectively.HTML/PHP CODE: [EDIT]
EDIT: Use
index.phpnotindex.htmlwhen embedding PHP codes in HTML or your php code will be treated as plain text/html