Advanced Form Scripting

  • willstein
  • Loser
  • Loser
  • willstein
  • Posts: 117
  • Loc: Maryland

Post 3+ Months Ago

I need help with a form I want to make.


This is what I'm looking to do:

The form will have three fields.
    1.) Artist
    2.) Title
    3.) <browse for song> (upload)



Then the file audiolist.xml will be edited.
A new line will be created with the following:
<song path="field 3" bild="no image needed for user submit" artist="field 1" title="field 2"/>

All I need to do is make it so that when the form is submitted, it adds a line with the code above, and insert's whatever they put for field 1, 2, and 3.

This would be a great help, thank you very much for you're time.
I'll be checking back soon, so if you have any questions feel free to post.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Lieven
  • Beginner
  • Beginner
  • User avatar
  • Posts: 57
  • Loc: Belgium

Post 3+ Months Ago

I would recommend you to find a php guestbook script that uses a textfile (at hotscripts.com), find out how it works and modify it to your needs.
  • Inito
  • Graduate
  • Graduate
  • User avatar
  • Posts: 223

Post 3+ Months Ago

this should do it:

Code: [ Select ]

<?php
$fp = fopen{"audiolist.xml", "a");
  fputs($fp, "<song path=\"field 3\" bild=\"no image needed for user submit\" artist=\"field 1\" title=\"field 2\"/>" . "\n");
  fclose($fp);
?>
  1. <?php
  2. $fp = fopen{"audiolist.xml", "a");
  3.   fputs($fp, "<song path=\"field 3\" bild=\"no image needed for user submit\" artist=\"field 1\" title=\"field 2\"/>" . "\n");
  4.   fclose($fp);
  5. ?>


add up your conditions

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 183 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.