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? Link to comment https://forums.phpfreaks.com/topic/161758-solved-were-did-the-slashes-go/ Share on other sites More sharing options...
haku Posted June 11, 2009 Share Posted June 11, 2009 $target_path = "images\\cat\\images"; Link to comment https://forums.phpfreaks.com/topic/161758-solved-were-did-the-slashes-go/#findComment-853452 Share on other sites More sharing options...
mike12255 Posted June 11, 2009 Author Share Posted June 11, 2009 same error: imagescatimages004 Automobile dashboard.jpg Link to comment https://forums.phpfreaks.com/topic/161758-solved-were-did-the-slashes-go/#findComment-853466 Share on other sites More sharing options...
mike12255 Posted June 13, 2009 Author Share Posted June 13, 2009 anyone know this reason for this...? Link to comment https://forums.phpfreaks.com/topic/161758-solved-were-did-the-slashes-go/#findComment-855265 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'; Link to comment https://forums.phpfreaks.com/topic/161758-solved-were-did-the-slashes-go/#findComment-855272 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.