adv Posted June 23, 2007 Share Posted June 23, 2007 hello i have this: this is the index.html Description:</b> <input name="desc" maxlength="15" type="text"> <a name="go" id="go" href="check.php"><img src="index_files/funny_desc.gif" alt="" border="0"></a></td> how do i do it in the check.php when someone press the icon it goes to check.php and in check.php i wanna check something like this: $desc = $_POST['desc']; if (icon_pressed) { if (empty($desc)) { echo "need description"; } else { header("location:success.php"); } i know how to do this with <input > with input u just add a hidden value bellow it <input type=submit value=submit name=submit> <input type=hidden value=1 name=enter> and in the .php if ($_POST['enter'] == "1") { $desc = $_POST['desc']; if (empty($desc)) { echo "error"; } } something like this i duno how to explain :| this is the best i can thanks in advance Link to comment https://forums.phpfreaks.com/topic/56889-site-problem/ Share on other sites More sharing options...
spooke2k Posted June 23, 2007 Share Posted June 23, 2007 set a on click on the image call the php page what ever it is so that it go to that page or more simple set a form and get it to do a php self on the code on post either way i would use sessions. failing that do it in java client side but best bet is use a onclick call the php page spooke2k Link to comment https://forums.phpfreaks.com/topic/56889-site-problem/#findComment-281087 Share on other sites More sharing options...
adv Posted June 23, 2007 Author Share Posted June 23, 2007 pff can u give me an example please? and what do i do there on <a href="check.php" i will modify it with <onclick = check.php> or say as u will do with a form or something i apeciate any help pff how do i do with with sessions or a form to load that image and check it in php Link to comment https://forums.phpfreaks.com/topic/56889-site-problem/#findComment-281091 Share on other sites More sharing options...
adv Posted June 24, 2007 Author Share Posted June 24, 2007 can someone help me please Link to comment https://forums.phpfreaks.com/topic/56889-site-problem/#findComment-281205 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.