Jump to content

Vince_M

Members
  • Posts

    4
  • Joined

  • Last visited

Profile Information

  • Gender
    Male

Vince_M's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I will try that tonight. How about my getting the blank records? That one I can't think of why at all.
  2. I am trying to upload an image to a images folder and also add the image name to the database. I am able to upload the image but cannot upload the name to the database. Also with the database I fill everything out and add it to the database and everything is fine (except for the image name) but I am getting blank records along with a filled out record (I don't have the slightest idea why this is happening). Please see the code below. If anyone can point me in the right direction for both of my questions I would greatly appreciate it. Thank you in advance. Create table php <?php include ("db_connect.php"); ?> <?php //select the database in which to add a table mysql_select_db("final_exam_db",$con); $sql = "CREATE TABLE drivers_0115061 (id int NOT NULL AUTO_INCREMENT, PRIMARY KEY(id), fn varchar(15), ln varchar(15), month varchar(9), day int, year int, name varchar(30), email varchar(40) )"; mysql_query($sql,$con); echo mysql_error(); ?> <?php include ("db_close.php"); ?> Add driver php <?php include("db_connect.php");?> <?php // select the database in which to add a table mysql_select_db("final_exam_db",$con); $sql ="INSERT INTO drivers_0115061 (ln,fn,month,day,year,name,email) VALUES ('".$_POST["ln"]."', '".$_POST["fn"]."', '".$_POST["month"]."', '".$_POST["day"]."', '".$_POST["year"]."', '".$_POST['file']['name']."', '".$_POST["email"]."' )"; mysql_query($sql, $con); echo mysql_error(); ?> <?php include("image_upload.php");?> <?php include("db_close.php");?> image upload php <?php $target_folder="images/"; $target_file=$target_folder.basename($_FILES["photo"]["name"]); if(move_uploaded_file($_FILES["photo"]["tmp_name"],$target_file)) { // echo "It Worked!"; echo "<a href='".$target_file."'target='phpfinalexam2013.php'/>".$target_file."</a>"; } // else // { // echo "Crap No Go!"; // } ?> Vince_M
  3. Hi Phailip, Thanks. It's a little of both. I will post it in the php coding help.
  4. Quite new here, actually this is my first day. I have a couple of questions regarding PHP and MySQL and was wondering where I ask them. They are for a school project I am working on and need some help. If you could point me in the direction of where I can ask them I would greatly appreciate it. Thanks, Vince
  5. Hello everyone, Just thought I would drop a quick note to introduce myself. I am a designer from Manitoba Canada. I have been working with print for the last 20 something years and now have decided to switch over to digital. I am new to php and interactive but am very eager to learn. So, if anyone gets a chance, stop by and say hello. Vince
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.