mike12255 Posted June 11, 2009 Share Posted June 11, 2009 I got the following code: if (isset($_POST['submit'])){ $pic = $_FILES['imagefile']['name']; $wantedname = $_POST['name']; $target_path = "images\cat\images"; $target_path = $target_path . basename( $_FILES['file']['name']); $name = basename( $_FILES['file']['name']); So im putting $target_path into the database. The picture name is So cute.jpg when i look at in the database it shows this: imagescatimagesso cute.jpg Theres no slashes in it but there was before it went into the database. Anyone know why? Quote Link to comment Share on other sites More sharing options...
haku Posted June 11, 2009 Share Posted June 11, 2009 $target_path = "images\\cat\\images"; Quote Link to comment Share on other sites More sharing options...
mike12255 Posted June 11, 2009 Author Share Posted June 11, 2009 same error: imagescatimages004 Automobile dashboard.jpg Quote Link to comment Share on other sites More sharing options...
mike12255 Posted June 13, 2009 Author Share Posted June 13, 2009 anyone know this reason for this...? Quote Link to comment Share on other sites More sharing options...
MadTechie Posted June 14, 2009 Share Posted June 14, 2009 Just use single quotes to stop the parsing $target_path = 'images\cat\images'; in anycase the path should be $target_path = 'images/cat/images'; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.