Brand New to PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi and thanks in advance,

I am quite new to php and appreciate the help and patience.  I am trying to have a form that allows uploading of user info and accompanying images into MySQL DB.  Text enters fine into the DB but the images will not.  I hope I provided enough info below (didnt want to post much more code for all to sift thru if not necessary)



<?php
if ($submit) {
  // process form
  $db=mysql_connect("66.220.69.20","*******","******");
  mysql_select_db("sammies models",$db);
  $sql="INSERT INTO models (first, last, age, email, location, eye, hair, experience, aspirations, mtype, picname1, picname2, picname3, picname4, picname5, picname6, picname7, picname8) 
  VALUES ('$first','$last','$age','$email','$location','$eye','$hair','$experience','$aspirations','$mtype','$picname1','$picname2','$picname3','$picname4','$picname5','$picname6','$picname7','$picname8')";
  mysql_query($sql) or die(mysql_error());
 exec("cp $picname1 c:/sammiwww/pic/$picname1"); 
 exec("cp $picname2 c:/sammiwww/pic/$picname2");
 exec("cp $picname3 c:/sammiwww/pic/$picname3");
 exec("cp $picname4 c:/sammiwww/pic/$picname4");
 exec("cp $picname5 c:/sammiwww/pic/$picname5");
 exec("cp $picname6 c:/sammiwww/pic/$picname6");
 exec("cp $picname7 c:/sammiwww/pic/$picname7");
 exec("cp $picname8 c:/sammiwww/pic/$picname8");
    echo "First: $first<br>\n"; 
    echo "Last: $last<br>\n"; 
    echo "Age: $age<br>\n"; 
    echo "Email: $email<br>\n"; 
    echo "Location: $location<br>\n";
    echo "Eye color: $eye<br>\n";
    echo "Hair color: $hair<br>\n";
    echo "Experience: $experience<br>\n";
    echo "Aspirations: $aspirations<br>\n";
    echo "Media Type: $mtype<br>\n";
    echo "Photo 1: $picname1<br>\n";
    echo "<img src=c:/sammiwww/pic/$picname1><br>\n";
    echo "Photo 2: $picname2<br>\n";
    echo "<img src=c:/sammiwww/pic/$picname2><br>\n";
    echo "Photo 3: $picname3<br>\n";
    echo "<img src=c:/sammiwww/pic/$picname3><br>\n";
    echo "Photo 4: $picname4<br>\n"; 
    echo "<img src=c:/sammiwww/pic/$picname4><br>\n";
    echo "Photo 5: $picname5<br>\n"; 
    echo "<img src=c:/sammiwww/pic/$picname5><br>\n";
    echo "Photo 6: $picname6<br>\n";
    echo "<img src=c:/sammiwww/pic/$picname6><br>\n";
    echo "Photo 7: $picname7<br>\n";
    echo "<img src=c:/sammiwww/pic/$picname7><br>\n";
    echo "Photo 8: $picname8<br>\n";
    echo "<img src=c:/sammiwww/pic/$picname8><br>\n";
    echo  "<b><center>Thank you for registering,&nbsp; $first </b></center><p>";
 ?> 


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.427 / Virus Database: 240 - Release Date: 12/7/2002

[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux