You are here:  » Using a custom image to submit reviews


Using a custom image to submit reviews

Submitted by getgood on Thu, 2006-04-27 10:15 in

Hi Dave,

Just playing with my templates and have added a custom image to submit reviews but it doesn't seem to be working?

Original submit:

<input type='submit' name='submit' value='<?php print translate("Submit"); ?>' />

Changed to image:

<input name="image" type="image" src="http://www.thebiggolfstore.com/images/submit.gif">

All it does is refresh the page and the review doesn't get sent?

Can't figure this out...any ideas?

Cheers

Adam

Submitted by support on Thu, 2006-04-27 10:22

Hi Adam,

It's probably because the review script is testing for a POST variable of the name "submit" in the following line:

if (isset($_POST["submit"]))

If you change the image name to "submit" as follows it might work:

<input name="submit" type="image" src="http://www.thebiggolfstore.com/images/submit.gif">

If it doesn't, simply create a hidden field with the name submit, as follows:

<input type="hidden" name="submit" value="1" />

Submitted by getgood on Thu, 2006-04-27 10:51

Thanks again...works perfect