phpbeginner Posted June 25, 2007 Share Posted June 25, 2007 I have an upload form where a user can upload either 1 .jpg or 1 document for each section of a webpage and the database is storing a link while the file is uploaded to a folder. The form will only allow to upload one or the other, not both. On my output I want to distinguish wether the file is .jpg for some coding for an image. If it is not a .jpg extension then it will go into another area. Is there an easy way to do this ? Below is my code that I tried for the output..... <?php if($row[6]!=".jpg") { echo("<p> <img src='??????/" . $row[6] . "' align='left' hspace=10 vspace=5 width=100></p><p>" . $row[5] . "</p><br><br><br>"); } else { echo("<p>" . $row[5] . "</p>"); echo("<p><a href='??????" . $row[6] . "'>READ MORE</a></p>"); ?> Quote Link to comment Share on other sites More sharing options...
phpbeginner Posted June 26, 2007 Author Share Posted June 26, 2007 Does anyone have any tips for me on this ? Again, I just need to distinguish if $row[6] is a .jpg extension or not. Thanks in advance. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.