selected picture from database is not appearing?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Paul NIcolai Sunga
    New Member
    • Mar 2008
    • 43

    selected picture from database is not appearing?

    are these codes are right?
    these are what i use in retrieving the picture..


    Code:
     <?Php   
     error_reporting (E_ALL ^ E_NOTICE);
      
     $Link = mysqli_connect("localhost","root","tupi", "amyak_maleh");
                 if (!$Link)
                   {
                   trigger_error("Could not connect", E_USER_ERROR );
                   }
     $query = mysqli_query($Link, "SELECT picture FROM Registration_form ORDER BY form_no DESC LIMIT 1" );
      
        if($row = mysqli_fetch_row($query))
        {
          $picture1 = $row['picture'];
        }
      
        ?>
      
     <table width="200" border="1">
       <tr>
     <td><input name="pix" type="image" value="<?Php  error_reporting (E_ALL ^ E_NOTICE);  echo $picture; ?>"/></td>
     </tr>
     </table>
    ?>
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    nope, see this thread for an explanation ;)

    Comment

    • vinothPHP
      New Member
      • Jul 2009
      • 6

      #3
      <input type="image" src="<?Php error_reporting (E_ALL ^ E_NOTICE); echo $picture; ?>" />

      try this...

      Comment

      • Dormilich
        Recognized Expert Expert
        • Aug 2008
        • 8694

        #4
        Originally posted by vinothPHP
        <input type="image" src="<?Php error_reporting (E_ALL ^ E_NOTICE); echo $picture; ?>" />

        try this...
        won't work either (for the same reason)

        the complete definitions for an input element (src attribute marked in bold)
        Code:
        <!ENTITY % InputType
          "(TEXT | PASSWORD | CHECKBOX |
            RADIO | SUBMIT | RESET |
            FILE | HIDDEN | IMAGE | BUTTON)"
           >
        
        <!-- attribute name required for all but submit and reset -->
        <!ELEMENT INPUT - O EMPTY              -- form control -->
        <!ATTLIST INPUT
          %attrs;                              -- %coreattrs, %i18n, %events --
          type        %InputType;    TEXT      -- what kind of widget is needed --
          name        CDATA          #IMPLIED  -- submit as part of form --
          value       CDATA          #IMPLIED  -- Specify for radio buttons and checkboxes --
          checked     (checked)      #IMPLIED  -- for radio buttons and check boxes --
          disabled    (disabled)     #IMPLIED  -- unavailable in this context --
          readonly    (readonly)     #IMPLIED  -- for text and passwd --
          size        CDATA          #IMPLIED  -- specific to each type of field --
          maxlength   NUMBER         #IMPLIED  -- max chars for text fields --
          [B]src         %URI;          #IMPLIED  -- for fields with images --[/B]
          alt         CDATA          #IMPLIED  -- short description --
          usemap      %URI;          #IMPLIED  -- use client-side image map --
          ismap       (ismap)        #IMPLIED  -- use server-side image map --
          tabindex    NUMBER         #IMPLIED  -- position in tabbing order --
          accesskey   %Character;    #IMPLIED  -- accessibility key character --
          onfocus     %Script;       #IMPLIED  -- the element got the focus --
          onblur      %Script;       #IMPLIED  -- the element lost the focus --
          onselect    %Script;       #IMPLIED  -- some text was selected --
          onchange    %Script;       #IMPLIED  -- the element value was changed --
          accept      %ContentTypes; #IMPLIED  -- list of MIME types for file upload --
          >

        Comment

        Working...