divadiva Posted June 16, 2008 Share Posted June 16, 2008 Experts This piece of code uploads an image.Can someone tell me what this code is doing? <TR> <TD><% if($i_row['image1'] && ! substr_count($i_row['image1'],'unavailable.')) { %><IMG BORDER="0" SRC="<%= '../files/' . $i_row['image1']; %>" ALT=" " WIDTH="300"><% } %></TD> </TR> <TD> <% $jvb = "'image1','Image 1','" . $image1 . "','jpg'" ; %> <INPUT TYPE="TEXT" NAME="image1" SIZE="40" MAXLENGTH="50" VALUE="<%= $image1 ; %>"> <A HREF="<%= 'javascript:fselect(' . $jvb . ') ;' ; %>">Select</A><% if($image1 && ! substr_count($image1,'unavailable.')) { %> | <A HREF="<%= '../files/' . $image1; %>" TARGET="_blank">View</A><% } %> </TD> Regards Diva Link to comment https://forums.phpfreaks.com/topic/110447-solved-working-with-pictures/ Share on other sites More sharing options...
Jabop Posted June 16, 2008 Share Posted June 16, 2008 What it's doing is using ASP tags within PHP. Looks like it's selecting an image record from a database and displaying it. Link to comment https://forums.phpfreaks.com/topic/110447-solved-working-with-pictures/#findComment-566642 Share on other sites More sharing options...
divadiva Posted June 16, 2008 Author Share Posted June 16, 2008 Thanks.Can you tell me is it good to use jvb? Link to comment https://forums.phpfreaks.com/topic/110447-solved-working-with-pictures/#findComment-566644 Share on other sites More sharing options...
Jabop Posted June 16, 2008 Share Posted June 16, 2008 I'm not familiar with JVB. Link to comment https://forums.phpfreaks.com/topic/110447-solved-working-with-pictures/#findComment-566647 Share on other sites More sharing options...
divadiva Posted June 16, 2008 Author Share Posted June 16, 2008 I am not as well.But Thankyou for telling what it is doing. Would you recommend that I should change this and use a file upload in php tutorial http://www.tizag.com/phpT/fileupload.php. Thanks in advance for replying. Link to comment https://forums.phpfreaks.com/topic/110447-solved-working-with-pictures/#findComment-566652 Share on other sites More sharing options...
Jabop Posted June 16, 2008 Share Posted June 16, 2008 What are you trying to accomplish? What does the current script in place do, and what are you trying to change about it? Link to comment https://forums.phpfreaks.com/topic/110447-solved-working-with-pictures/#findComment-566654 Share on other sites More sharing options...
divadiva Posted June 16, 2008 Author Share Posted June 16, 2008 My aim is to make it this code more readable and give an easy user interface .Currently the scriipt works in IE only(thats strange for me).As you have mentioned it selects pictures but I am unable to find from which location.Is there any good way of doing file uploading? Link to comment https://forums.phpfreaks.com/topic/110447-solved-working-with-pictures/#findComment-566705 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.