showing Image on the basis of form values not working

images php coding issues or problems here.

Moderators: macek, egami, gesf

maheshdm
New php-forum User
New php-forum User
Posts: 2
Joined: Fri Jul 04, 2003 6:12 am

showing Image on the basis of form values not working

Postby maheshdm » Fri Jul 04, 2003 6:57 am

:(
hi dear all,
i have a small script on my NT 4,apache 1.3 and php 4.0.3 server. i have around 21400 images in png format. Names of these files are <"mactype"+"macno".png> fashion e.g. if mactype is "LI" and macno is 676622 then file name will be LI676622.png. On the basis of typed mactype and macno i will have to show that file.
following is the my script:
<html><head><title>Welcome to Web</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head><body>
<form action="" method="post" name="form1" target="_self">
<table width="59%" border="0" cellpadding="3"><tr valign="middle"><td height="41" colspan="2"><h1 align="center"><font face="Georgia, Times New Roman, Times, serif">Web</font></h1></td></tr><tr valign="middle">
<td width="39%" height="21" bgcolor="#ccccff"><div align="right"><strong><font face="Georgia, Times New Roman, Times, serif">MACType :</font></strong><strong><font face="Georgia, Times New Roman, Times, serif">
</font></strong><strong><font face="Georgia, Times New Roman, Times, serif">
</font></strong></div></td>
<td width="61%" bgcolor="#ccccff"><strong><font face="Georgia, Times New Roman, Times, serif">
<select name="select_actype" size="1" id="select_actype">
<option value="LI">Liaso</option>
<option value="MO">Moshwa</option>
<option value="CD">CentraDec</option>
</select>
</font></strong></td>
</tr>
<tr valign="middle">
<td height="21" bgcolor="#ccccff"><div align="right"><strong><font face="Georgia, Times New Roman, Times, serif">MAC
No: </font></strong><strong><font face="Georgia, Times New Roman, Times, serif">
</font></strong></div></td>
<td height="21" bgcolor="#ccccff"><strong><font face="Georgia, Times New Roman, Times, serif">
<input name="text_accno" type="text" id="text_accno">
</font></strong></td>
</tr>
<tr>
<td height="32" colspan="2" bgcolor="#ccccff"><div align="center"> </div>
<div align="center">
<input name="Submit" type="submit" id="Submit" value="Get File">
&&&&
<input type="reset" name="Reset" value="Reset">
</div>
<div align="center"></div></td>
</tr>
<tr>
<td height="21" colspan="2" bgcolor="#ccccff"><center><?php print "File of $select_actype / $text_accno"; ?></center></td>
</tr>
</table>
<table width="59%" height="230" border="1" cellpadding="1" cellspacing="1">
<tr>
<td><img src=./sgns/<?php echo $select_actype; print $text_accno; ?>.png width="445" height="224" border="1">
</td>
</tr>
</table>
</form>
</body>
</html>[/b]

Return to “PHP coding => Images”

Who is online

Users browsing this forum: No registered users and 1 guest