Jump to content

site problem


adv

Recommended Posts

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
Share on other sites

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
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.