SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast paramedic's Avatar
    Join Date
    Oct 2007
    0 Post(s)
    0 Thread(s)

    image update to db

    Hi guys

    I am creating a site which allows people to upload images of there properties together with details of their properties. I have successfully created an screen where the property details can be altered but I am having proplems with the images. I allow 5 pictures. This is a snippet from the admin page. it checks to see if the database holds an image and if it does it echo's the image. If not it displays a box to browse for a picture. The problem is, if there is an image and it is being displayed how do I transfer the details of that image to my updat_ac.php page.

    PHP Code:
    if (strlen($pic) > 0) {  
    echo "<img src={$rows['pic']}>";
    echo '<a href="delete_image.php?id='.$rows['pic'].' id2='.$rows['username'].'"><img src=></a><br>';

    else {
    <label>Photograph 1: </label><input type="file" name="photo_1" /><br />
    Any pointers would be helpful

  2. #2
    Theoretical Physics Student bronze trophy Jake Arkinstall's Avatar
    Join Date
    May 2006
    Lancaster University, UK
    2 Post(s)
    0 Thread(s)
    Well, there won't be any file upload therefore you don't need to change it.
    Jake Arkinstall
    "Sometimes you don't need to reinvent the wheel;
    Sometimes its enough to make that wheel more rounded"-Molona


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts