Jump to content

[SOLVED] Processing form data [ simple problem ]


Goose87

Recommended Posts

Hey guys,

 

This is quite an embarassing question, as I'm probably being VERY stupid! but I'm really ill at the moment so I can't think properly.

 

When I normally have a form I'll have the normal:

 

<form method="post"...... >

<input type="submit" value="Submit" name="button1">

</form>

 

and the php would be:

 

if(isset($_POST['submit'])){

** do something **

}

 

I've got to use the <input type="image" ... > for the new layout i've got and I've hit a snag....

 

if(isset($_POST['submit'])){   doesn't work any more because it's not a submit button.

 

Can anyone help me out?

 

Cheers.

Are you trying to see if the "image" field has a value or not? If that's the case you just check for it by field name or even see if any $_FILES[] are present. But to answer you, the button for the image field isn't a submit button although you could emulate it with javascript.

I'm trying to submit data that is in a form.  The form i'm submitting is a message system within a game.  Has two fields in it, and i just want to initiate the PHP code when the user presses the image button.  I COULD do it via the $_GET function, but if you use $_GET, then I have problems sending large bits of data and stuff, so i'd prefer to send it via $_POST.  Any ideas?

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.