tarun Posted March 16, 2007 Share Posted March 16, 2007 This A Quick Bit Of PHP Code Which I Have Just QUICKLY Made For Another PHP Freaks Forums User Can You Please Check Through It - It Is Currently Outputting An Error! <?php $addform = '<form action="$PHP_SELF" method="post"> Video URL:<BR><input type="text" name="url" size="40"> <br>Video Description:<br><textarea rows="10" cols="30" name="desc"></textarea><br></form> <input type="submit" value="Add Video">' echo '$addform'; if (isset($_POST['Submit'])) { $url = $_POST['url']; $desc = $_POST['desc']; if(empty($url)){ echo 'Please Specify The URL Of The Video<br>'; } elseif(empty($desc)){ echo 'Please Specify A Description Of The Video<br>'; } else{ $newcontent = '<videos> <video url="$url" desc="$desc" /> </videos>'; $previouscontent = file_get_contents("videoplaylist.xml"); $openfile = fopen("videoplaylist.xml", "w"); $totalfile = $previouscontent.$newcontent; fwrite($openfile, $totalfile); fclose($openfile); echo 'File Added To Playlist<br><br>Add A New File?<br>$addform'; } } ?> Thnx, Tarun Link to comment https://forums.phpfreaks.com/topic/43022-no-title-yet/ Share on other sites More sharing options...
Orio Posted March 16, 2007 Share Posted March 16, 2007 What's the error...? EDIT- noticed you have a missing semicolon after defining $addform. You probably have a T_ECHO error. Orio. Link to comment https://forums.phpfreaks.com/topic/43022-no-title-yet/#findComment-208944 Share on other sites More sharing options...
tarun Posted March 16, 2007 Author Share Posted March 16, 2007 Parse error: parse error, unexpected T_ECHO in /home/www/**********/**********.php on line 10 Thnx, Tarun Link to comment https://forums.phpfreaks.com/topic/43022-no-title-yet/#findComment-208945 Share on other sites More sharing options...
Orio Posted March 16, 2007 Share Posted March 16, 2007 Read my edit ^ Orio. Link to comment https://forums.phpfreaks.com/topic/43022-no-title-yet/#findComment-208946 Share on other sites More sharing options...
tarun Posted March 16, 2007 Author Share Posted March 16, 2007 Oh Sorry I Just Posted When You Were Editing And Thnx I Always Make Some Stupid Mistake Like That - DER HOW DUMB THANKS Link to comment https://forums.phpfreaks.com/topic/43022-no-title-yet/#findComment-208947 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.