Jump to content

button image


fife

Recommended Posts

ok I have this looping query which works and displays everything I need

 

while ($CP = mysql_fetch_array($Link)) {

if ($CP['logo']=='logo_default.jpg') 
					{ echo "<img src=\"/images/logo_default.jpg\" border='0' alt=\"{$CP['name']}\" />"; }
   else { echo	"<img src=\"/members/images/{$CP['county']}/{$CP['logo']}\" border='0' alt=\"{$CP['name']}\" />"; }
$CP['clubID'];
}

 

Now I want to have a form where the only visible element is club image so I have made that form....

 

while ($CP = mysql_fetch_array($Link)) { 
         	
   <form action="" id="myclubfrm"> 
                   		
                        <input  type="image" scr="<?php  if ($CP['logo']=='logo_default.jpg') 
					{ echo "/images/logo_default.jpg"; }
   else { echo	"/members/images/{$CP['county']}/{$CP['logo']}"; } ?>" width="200" height="133" name="clubinsert" >
       <input name="club" type="hidden" value="<?php $CP['clubID']; ?>">
                        <input name="pap" type="hidden" value="<?php $CP['permission'];?>">
     				</form>


   }

 

The issue is that if I do it the second way no image is displayed.  Just blank a image box with writing in the middle saying submit

Link to comment
https://forums.phpfreaks.com/topic/238592-button-image/
Share on other sites

I did dump html code.  there is the correct formatting I just missed it for shortening purposes.

 

The view source shows......

 

<input type="image" scr="../images/logo_default.jpg" width="200" height="133" name="clubinsert">
<input name="club" type="hidden" value="">
<input name="pap" type="hidden" value="">

Link to comment
https://forums.phpfreaks.com/topic/238592-button-image/#findComment-1226101
Share on other sites

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.