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 Quote Link to comment 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. Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Orio Posted March 16, 2007 Share Posted March 16, 2007 Read my edit ^ Orio. Quote Link to comment 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 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.