Having trouble displaying images on my results page

I have tried placing the following code (<img src="*<?php echo $row_rsppleresults['picture_upload']; ?>*>) BOLDED AREA (see code below very last entry) in hopes that it would display the image. However, what happens after I place the code in that location is that I get an invalid code error that there is something wrong with the Italic BOLDED area (see below very last entry). In addition, to that it changes the html formatting on my page when I try to view the page and no image shows up.  As of right now when someone fills out the input form the photo automatically get uploaded into the following directory-/public_html/rescuealerts/fomdata/uploads_missing_person_form.  I am clueless how to connect the correct image with the correct input information in the search display table. Below you will find the following- my code for the results page and my dynamic table.  Everything else in the dynamic table displays correctly. It the images that I can seem to get displayed. Any help would be greatly appreciated.
Results page:
<?php require_once('../Connections/rescue.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;   
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  return $theValue;
$currentPage = $_SERVER["PHP_SELF"];
$maxRows_rsppleresults = 10;
$pageNum_rsppleresults = 0;
if (isset($_GET['pageNum_rsppleresults'])) {
  $pageNum_rsppleresults = $_GET['pageNum_rsppleresults'];
$startRow_rsppleresults = $pageNum_rsppleresults * $maxRows_rsppleresults;
mysql_select_db($database_rescue, $rescue);
$query_rsppleresults = "SELECT missing_name, `description`, picture_upload, missing_person_form.missing_name, missing_person_form.`description`, missing_person_form.picture_upload FROM missing_person_form";
$query_limit_rsppleresults = sprintf("%s LIMIT %d, %d", $query_rsppleresults, $startRow_rsppleresults, $maxRows_rsppleresults);
$rsppleresults = mysql_query($query_limit_rsppleresults, $rescue) or die(mysql_error());
$row_rsppleresults = mysql_fetch_assoc($rsppleresults);
if (isset($_GET['totalRows_rsppleresults'])) {
  $totalRows_rsppleresults = $_GET['totalRows_rsppleresults'];
} else {
  $all_rsppleresults = mysql_query($query_rsppleresults);
  $totalRows_rsppleresults = mysql_num_rows($all_rsppleresults);
$totalPages_rsppleresults = ceil($totalRows_rsppleresults/$maxRows_rsppleresults)-1;$maxRows_rsppleresults = 10;
$pageNum_rsppleresults = 0;
if (isset($_GET['pageNum_rsppleresults'])) {
  $pageNum_rsppleresults = $_GET['pageNum_rsppleresults'];
$startRow_rsppleresults = $pageNum_rsppleresults * $maxRows_rsppleresults;
$colname_rsppleresults = "-1";
if (isset($_POST['missing_name'])) {
  $colname_rsppleresults = $_POST['missing_name'];
mysql_select_db($database_rescue, $rescue);
$query_rsppleresults = sprintf("SELECT missing_name, `description`, picture_upload FROM missing_person_form WHERE missing_name LIKE %s", GetSQLValueString("%" . $colname_rsppleresults . "%", "text"));
$query_limit_rsppleresults = sprintf("%s LIMIT %d, %d", $query_rsppleresults, $startRow_rsppleresults, $maxRows_rsppleresults);
$rsppleresults = mysql_query($query_limit_rsppleresults, $rescue) or die(mysql_error());
$row_rsppleresults = mysql_fetch_assoc($rsppleresults);
if (isset($_GET['totalRows_rsppleresults'])) {
  $totalRows_rsppleresults = $_GET['totalRows_rsppleresults'];
} else {
  $all_rsppleresults = mysql_query($query_rsppleresults);
  $totalRows_rsppleresults = mysql_num_rows($all_rsppleresults);
$totalPages_rsppleresults = ceil($totalRows_rsppleresults/$maxRows_rsppleresults)-1;
$queryString_rsppleresults = "";
if (!empty($_SERVER['QUERY_STRING'])) {
  $params = explode("&", $_SERVER['QUERY_STRING']);
  $newParams = array();
  foreach ($params as $param) {
    if (stristr($param, "pageNum_rsppleresults") == false &&
        stristr($param, "totalRows_rsppleresults") == false) {
      array_push($newParams, $param);
  if (count($newParams) != 0) {
    $queryString_rsppleresults = "&" . htmlentities(implode("&", $newParams));
$queryString_rsppleresults = sprintf("&totalRows_rsppleresults=%d%s", $totalRows_rsppleresults, $queryString_rsppleresults);
?>
Here is my code for the dynamic table (this is also where I have been trying to edit the code to look for the images that were uploaded with the initial form.
Dynamic Table:
    <tr>
      <td style="font-weight: normal; color: #000; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"><div align="left"><?php echo $row_rsppleresults['missing_name']; ?></div></td>
      <td style="font-weight: normal; color: #000; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"><div align="left"><?php echo $row_rsppleresults['description']; ?></div></td>
      <td style="font-weight: normal; color: #000; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"><div align="left"><?php echo $row_rsppleresults['picture_upload']; ?></div></td>
    </tr>
    <?php } while ($row_rsppleresults = mysql_fetch_assoc($rsppleresults)); ?>
</table>
Thank you,
hjohnson2011

    <tr>
      <td style="font-weight: normal; color: #000; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"><div align="left"><?php echo $row_rsppleresults['missing_name']; ?></div></td>
      <td style="font-weight: normal; color: #000; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"><div align="left"><?php echo $row_rsppleresults['description']; ?></div></td>
      <td style="font-weight: normal; color: #000; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"><div align="left"><?php echo $row_rsppleresults['picture_upload']; ?></div></td>
    </tr>
    <?php } while ($row_rsppleresults = mysql_fetch_assoc($rsppleresults)); ?>
</table>
First off, you should style the table, rows and cells by using CSS. Also, there is no need for a div within the cell because, again, you can use CSS to do the styling for you. Not only that, depending on the DOCTYPE that has been used, tou will get an invalid markup when using align=left.
Depending on what is included in the picture_upload field (just the name and extension or the complete path and file name) your markup should look like
<table>
  <tr>
    <td><?php echo $row_rsppleresults['missing_name']; ?></td>
    <td><?php echo $row_rsppleresults['description']; ?></td>
    <td><img src="<?php echo $row_rsppleresults['picture_upload']; ?>"></td>
  </tr>
</table>
if the picture_upload field contains all of the info, or if it only contains the filename+extension
<table>
  <tr>
    <td><?php echo $row_rsppleresults['missing_name']; ?></td>
    <td><?php echo $row_rsppleresults['description']; ?></td>
    <td><img src="escuealerts/fomdata/uploads_missing_person_form/<?php echo $row_rsppleresults['picture_upload']; ?>"></td>
  </tr>
</table>
Gramps

Similar Messages

  • Having trouble displaying images on a page in APEX through IE.

    I'm trying to conditionally display images (used as toggle buttons) in a tabular report in APEX. This is for our Benefits application where an employee can include or exclude his/her dependents from the plan. For each row, in one column I want to show only 'Include' button if an individual is not already a member, and in another column show only 'Remove' button if already included. I'm using the button images as links and passing information to a page process.
    I was able to come up with the SQL query which works perfectly fine in Firefox. But the images won't display in Internet Explorer. Does anyone have any idea how to make this work in IE?
    Below is my query. This code will display 'Include in plan' image only if the member is not already added to the plan. If 'Y' is the result of the query, then the member is already included and no image is displayed. Otherwise display the image. Pass the member_id to an application item and process the record in a Before Header process.
    select elected_member_id, member_type, last_name, first_name, middle_name, gender,date_of_birth,student_flag,trunc(months_between(sysdate ,date_of_birth)/12) AGE,
    decode((select 'Y'
    from eben_elected_plan_info epi
         where plan_name not in ('Delta', 'Vision', 'HEALTH_FLEX', 'DEP_FLEX')
         and epi.elected_member_id = emi.elected_member_id
         and transaction_type <> 'END'), null,'<a href="f?p=&APP_ID.:70:&SESSION.::::F_APP_MEMBER_INCLUDE:'||elected_member_id||'<img src="&WORKSPACE_IMAGES.include.png"></a>') elected_member_id_include,
    elected_member_id elected_member_id_exclude
    from eben_elected_members_info emi
    where emp_person_id = :f_app_person_id
    and member_type <> 'Employee'

    I was able to resolve this issue by creating the SQL statement from scratch in IE. It then recognized the images.

  • Help! I'm having trouble with images on my web page.

    I'm trying to create a page with a bunch of my photos but I need the photos broken up into groups so I can discuss the different groups. So I simply cut and paste the photo area several times BUT now when I click on any picture in any group it only does a slideshow for the last group of photos.
    I guess I could simply break the single page into multiple pages but that is so inconvenient in iWeb since it doesn't let you cut and paste template pages! Apple needs to seriously fix this shortcoming. How can you not allow cutting and pasting of pages??
    Here's the page I'm having trouble with:
    http://photo.braintransplants.com/Site/Astronomy.html
    Thanks!
    PowerBook G4 17 (A1085) 1.5 GHz / 1.5 GB RAM / 128 MB VRAM / 80 GB HD   Mac OS X (10.4.2)  

    You probably realise by now that you're attempting to do things with iWeb which it just wasn't intended to do. Cutting and pasting the photo grid area just won't work as you want it to. To work within iWeb's limitations might i suggest that you use the 'nesting' approach described in several posts here already. Use a single representative image on your main page for each of the situations you want to cover, and link each of these to an appropriate Photo page which has 'Include page in navigation menu' unchecked.
    You could add a link on each of the Photo pages which returns to your main descriptive page.

  • Having trouble displaying image in JPanel

    I want to display an image in jpanel making it to scale to the size of the panel.
    And later i should be able to draw on that image , i am really new to all this , but i have to finish it soon.
    This is the code i am compiling and getting error
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class LocaterClient extends JFrame
         JPanel panel;
         public LocaterClient()
              super("LocaterClient");
              panel = new JPanel();
              panel.setSize(374,378);
              panel.setOpaque(false);
              panel.setVisible(true);
         getContentPane().add(panel);
         /*JFrame f = new JFrame();
         f.setSize(374,378);
         f.getContentPane().add(panel);*/
         public void paintComponent(Graphics g)
              super.paintComponent(g);
              ImageIcon img = new ImageIcon("World_MER.jpg");
              ImageIcon fillImage = new ImageIcon(img.getImage().getScaledInstance
    (getWidth(), getHeight(),Image.SCALE_REPLICATE));
              g.drawImage(fillImage.getImage(), 0,0, this);
         public static void main(String args[])
              LocaterClient lc = new LocaterClient();
              lc.setDefaultCloseOperation( EXIT_ON_CLOSE );
              lc.pack();
              lc.setVisible(true);
    This is the error i am getting
    LocaterClient.java:24: cannot resolve symbol
    symbol : method paintComponent (java.awt.Graphics)
    location: class javax.swing.JFrame
    super.paintComponent(g);
    ^
    1 error
    If i remove super.paintComponent(g); line it compiles and runs but i get a tiny panel without the image.
    PLease help me , i am not evn sure is this is the procedure should i follow , because i should be able to draw on that image later on .
    Please provide me with some sample code.

    import javax.swing.*;
    import java.awt.*;
    public class ImagePainter extends JPanel{
      private Image img;
      public ImagePainter(){
        img = Toolkit.getDefaultToolkit().getImage("MyImage.gif");
      public void paintComponent(Graphics g){
        g.drawImage(img,0,0,getSize().width,getSize().height);
      public static void main(String[]args){
        JFrame frame = new JFrame();
        frame.getContentPane.add(new ImagePainter());
        frame.setSize(500,500);
        frame.show();

  • Having  trouble displaying images on TV

    I am able to show my movies on TV (version 2)but am unable to see images
    I tried the advanced  option but I only see a couple of imahes in my download folder
    How do I get photos and other images to to sho up or to load into iTuunes?

    When yo go to that option it lets you browse your whole computer so i'm not sure I understand. If you have all of your pictures in one folder (no matter where they are on your system) you should be able to find them.
    Navigate to the correct spot or put your photos in one place (folder) if they are not already

  • Having trouble displaying small image in Cart

    Hello everyone. I have been having trouble displaying the small image in my cart. I know that the image is there, yet it wont display. Any help would be appreciated. Thanks
    http://www.highestgoodclothing.com/men/stl-tee

    .productitemcell { }
    That in your css has no height.
    Add height:auto; to your code.

  • Having trouble displaying the Logged in Customer details.  The customer is able to register himself

    Having trouble displaying the Logged in Customer details.  The customer is able to register himself to my site but when he enters his username and password I don't know how to display the welcome username message and switch the login link to logout. Even afte the customer is logged in it still shows login. Please look at the image for more details.

    Thanks Sidney, that worked........I tried to change the css style of make the log out link to stay in same horizontal line as the Logged in but I can't.(Please see the image) Is it the module that is designed to work this way???
    And one more .....is there a way where I can change the message "No one logged in" to say LogIn.
    Thank you

  • Having trouble displaying a JPanel on a JFrame

    Hello all,
    I'm fairly new to Java and I am having trouble displaying a JPanel on a JFrame. Pretty much I have a class called Task which has a JPanel object. Everytime the user creates a new task, a JPanel with the required information is created on screen. However, I cannot get the JPanel to display.
    Here is some of the code I have written. If you guys need to see more code to help don't hesitate to ask.
    The user enters the information on the form and clicks the createTask button. If the information entered is valid, a new task is created and the initializeTask method is called.
    private void createTaskButtonMouseClicked(java.awt.event.MouseEvent evt) {                                             
        if (validateNewTaskEntry())
         String name = nameTextField.getText().trim();
         Date dueDate = dueDateChooser.getDate();
         byte hourDue = Byte.parseByte(hourFormattedTextField.getText());
         byte minuteDue = Byte.parseByte(minuteFormattedTextField.getText());
         String amOrPm = amPmComboBox.getSelectedItem().toString();
         String group = groupComboBox.getSelectedItem().toString();
         numberTasks++;
    //     if (numberTasks == 1)
    //     else
         Task newTask = new Task(mainForm, name, dueDate, hourDue, minuteDue,
             amOrPm, group);
         newTask.initializeTask();
         this.setVisible(false);
    }This is the code that I thought would display the JPanel. If I put this code in anther form's load event it will show the panel with the red border.
    public void initializeTask()
         taskPanel = new JPanel();
         taskPanel.setVisible(true);
         taskPanel.setBorder(BorderFactory.createLineBorder(Color.RED));
         taskPanel.setBounds(0,0,50,50);
         taskPanel.setLayout(new BorderLayout());
         mainForm.setLayout(new BorderLayout());
         mainForm.getContentPane().add(taskPanel);
    }I was also wondering if this code had anything to do with it:
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new AddTaskForm(new MainForm()).setVisible(true);
        }As you can see I create a new MainForm. The MainForm is where the task is supposed to be drawn. This code is from the AddTaskForm (where they enter all the information to create a new task). I had to do this because AddTaskForm needs to use variables and methods from the MainForm class. I tried passing the mainForm I already created, but I get this error: non-static variable mainForm cannot be referenced from a static context. So to allow the program to compile I passed in new MainForm() instead. However, in my AddTaskForm class constructor, I pass the original MainForm. Here is the code:
    public AddTaskForm(MainForm mainForm)
       initComponents();
       numberTasks = 0;
       this.mainForm = mainForm;
    }Is a new mainForm actually being created and thats why I can't see the JPanel on the original mainForm? If this is the case, how would I pass the mainForm to addTaskForm? Thanks a ton for any help/suggestions!
    Brian

    UPDATE
    While writing the post an idea popped in my head. I decided to not require a MainForm in the AddTaskForm. Instead to get the MainForm I created an initializeMainForm method.
    This is what I mean by not having to pass new MainForm():
        public static void main(String args[])
         java.awt.EventQueue.invokeLater(new Runnable()
             public void run()
              new MainForm().setVisible(true);
        }Even when I don't create the new MainForm() the JPanel still doesn't show up.
    Again, thanks for any help.
    Brian

  • Having trouble burning images to cd, get error code 0x8002006E - what is it?

    Hello all, I am having trouble burning images to a cd, I get error code 0x8002006E - what is it?  I have an older MacBook Pro, OSX 10.6.8.  Help!

    You might also try SMC and PRAM resets:
    http://support.apple.com/kb/ht3964
    http://support.apple.com/kb/ht1379
    And you might try deleting the "com.apple.finder.plist" in your Library.
    Ciao.

  • Having trouble with image processor...help please!

    HI there...First off I just bought a new iMac and haven't a clue what I'm doing so my problem could be related to that.  While I'm waiting for Adobe to transfer over my platform I downloaded the trial of CS5 Extended to get me started.  I'm having trouble with the image processor...I choose file/scripts/image processor...the dialog box comes up and I choose use open files and then try and choose the folder I want to save them in.  I choose my folder and hit run and it keeps telling me specify folder destination.  I can't for the life of me figure this out...what am I doing wrong?  It always worked fine for me on my PC and CS3.  I can't handle saving each image individually in the new folder...
    Thanks!!

    I haven't renamed anything as far as I know.  I made a new folder when I hit Folder option and it's highlighted as well as the path shows up in the processor box.  Just when I choose run it tells me to specify a folder.  The only thing I can think of is that maybe something messed up b/c I'm copied the files and folders over from my PC but it let me save as on the mac.  Also the folder I'm choosing to put them in is on the Mac harddrive.  IDK...

  • Refresh display image item without reload page

    hi all, is a way to refresh (requery) a display image item to change the image via botton and do not reload page ?
    thanks
    Edited by: Reza.Gh. on Sep 24, 2012 11:56 AM

    I create a sample app :
    https://apex.oracle.com/pls/apex/f?p=9310:1
    code of item  P1_CAPTCHA_IMG :
    SELECT captcha_img FROM captcha WHERE response = :P1_CAP_V;
    item P1_CAP_V  code (computations) :
    SELECT *
    FROM (
    SELECT response
    FROM captcha
    ORDER BY
    dbms_random.value
    WHERE rownum = 1 ;
    Refresh botton code :
    action 1 :
    SELECT * into :P1_CAP_V
    FROM (
    SELECT response
    FROM captcha
    ORDER BY
    dbms_random.value
    WHERE rownum = 1;
    action 2:
    refresh item P1_CAPTCHA_IMG

  • Displaying Image on th JSP page

    Hello All,
    I am using following code to display the image on the JSP page in my iView
    <% String PublicURL = componentRequest.getPublicResourcePath()+ "/images/Image1.gif"  ; %>
    <hbj:image id="Logo" width="70" height="35" 
                               src="<%= PublicURL %>"
                               alt= "picture Ericsson.gif" />
    Am I missing anything. I am still not able to display the image.
    Regards,
    Sanjeev

    change
    componentRequest.getPublicResourcePath()
    to
    componentRequest.getWebResourcePath()

  • Im having trouble saving images from photoshop to my samsung tablet any ideas

    im having trouble saving photoshopped imsges onto my samsung tablet any ideas ?

    I have no knowledge of the Android OS.  I do have an iPod and its OS iOS is not really comparable my Windows  OS.  The iPod does mount as a dive on windows and the iPod camera roll is accessible. The jpes images can be copied to my pc.  However the PC does not have access to the iOS file system even apple user don't have real access the iOS file system.   Image need to be synced between the iPod and PC through iTunes sync.  Itunes messes with your PC images and creates some sort of image database and syncs that database between PC and Apple mobile devices.  There are also apps that help you share file between PC and Apple mobile devices.  I have no idea how files are shared between PC Operating Systems platform versions and Android OS versions.  Photoshop may not be able to save to Android files system.  Photoshop Can not save to Apple mobile devices. Photoshop may be able to save to Apple's Mac unix file system through some form of network share.
    How does one share files between Android devices and PC OS devices?

  • How to display image is in result of query to MS Access database

    How can i display image (ole db) from MS Access database?
    I tried to do it throw streams but i have a package not a image. Also i trued to save image as a stream of characteristics but the image doesn't create.
    thnks

    Normally to construct an image in java you need the image data.
    If you have stored the image as a OLE object it may include additional data which make it imposible to identify the image data from java side.
    You need to find a way extract actual data from the ole object.

  • I work with students developing HTML/CSS pages. Having trouble displaying pictures and graphics offline in web pages. IE displays student graphics, but Firefox will not. Help?

    Students create web pages offline with normal C:/ drive designations. After they have all coding issues worked out, the server address is added prior to uploading code. Graphics are placed in an image folder and code is managed in a pages folder. All located on C:/ drive. However, FireFox will not display pictures. IE will display. Suspect I need to change settings, but don't know what or where.
    Thanks, LD_Gregory

    You not are using the latest Spry files
    The latest  version of the Adobe Spry Framework is 1.6.1, this is the same version  that ships with Dreamweaver CS4. If you use Dreamweaver CS3 (uses Spry  1.4), its wise to upgrade your files to the latest version. This can  easily be done using the Spry Updater that can be found here.
    If you replace
    <script src="http://www.adelxt.net/SpryAssets/SpryAccordion.js" type="text/javascript">
    with
    <script src="http://labs.adobe.com/technologies/spry/widgets/accordion/SpryAccordion.js" type="text/javascript"></script>
    you will notice that it works as it should.

Maybe you are looking for

  • Cannot send email off my imac account.

    Anyone, For some reason all of a sudden last night my imac email account has decided to stop working and will not send out email. It tries to send but then a drop down box appears and says the Outgoing Mail Server smtp account is not reading port 25.

  • Can't open downloads to desktop (Error code - 10660)

    Hi Everyone, I'm having a problem opening documents that are downloaded to my desktop. I recieve the following error, "The operation could not be completed. An unexpected error occurred (Error code - 10660)." I can go into the required program (i.e.

  • Unable to detect updates, 100% CPU usage by wuauserv

    Lawrence, Below is the log you requested.  This was taken after renaming the SoftwareDistribution directory.  The user reported CPU usage went back up to 100% at around 14:00 after which we killed the service.  This is too long for one post, so I'm b

  • How do I use Back to My Mac with a new Time Capsule if I don't have a MobileMe account?

    I just got a new time capsule and I'm trying to set it up so that I can remotely access the files when I'm at work/on the go etc. Now I have an iCloud account, but I don't have a MobileMe account. I do have an @me.com address because I enabled Mail t

  • Best practice for deletion of SAP standard configuration

    Does anyone have any documentation related to deletion of standard SAP configuration?  My client is requesting deletion of all the standard delivered company codes and I believe it is best practice to never delete them.  I am looking for supporting d