Announcement

Collapse
No announcement yet.

Script to upload image to MySQL

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Script to upload image to MySQL

    Hi Folks,

    I have a page that uploads data to MySQL.

    I would like to know if someone could help me with a script to upload an imgage to the same MySQL data base ?
    Kind Regards
    Rob
    www.gnjgf.co.za
    www.oryan-projects.com

  • #2
    Re: Script to upload image to MySQL

    Ok Folks,

    I have managed to get this far

    PHP Code:
    <?php
    $q
    =$_GET["q"];
    $con mysql_connect("localhost""****""*");
    if (!
    $con)
      {
    die (
    "Hey loser, check your server connection.");
    }
    mysql_select_db("e****_Members",$con);
    $sql="SELECT * FROM _Form_Nr_6 WHERE Record_Nr = '".$q."'"
    $result mysql_query($sql);
    echo 
    "<table border='5' cellpadding='3' cellspacing='2' bordercolor='#D6D6D8' font style='font-size:11px' color='#2611A2' face='Calibri'>
    <tr>
    <th bgcolor='#D3E2FE'>PICTURE</th>
    </tr>"
    ;
    while(
    $row mysql_fetch_array($result))
      {
      echo 
    "<tr>";
      echo 
    "<td>".($row['image'])."</td>";
       echo 
    "</tr>";
     }
    echo 
    "</table>";
    mysql_close($con);
    ?>
    I have managed to insert a field in MySQL called "image"

    However the picture doesnt load as can be seen here

    I would appreciate it if anyone can advise further ?
    Kind Regards
    Rob
    www.gnjgf.co.za
    www.oryan-projects.com

    Comment

    Working...
    X