+ Post New Thread
Results 1 to 8 of 8
Web Development Thread, Dreamweaver webforms in Coding and Web Development; anyone know how to use dreamweaver to use a text area and use a submit button, to Initially: Save the ...
  1. #1
    tommccann's Avatar
    Join Date
    Jun 2009
    Posts
    252
    Thank Post
    46
    Thanked 39 Times in 31 Posts
    Rep Power
    0

    Smile Dreamweaver webforms

    anyone know how to use dreamweaver to use a text area and use a submit button, to Initially:

    Save the text area to a text file, using the date and time as the file name.

    Then Secondly:

    Grabbing the username and computer name.


    This is staying offline so nothing that needs publishing to the internet.

    Cheers guys!!


    Ps i know how to create a form and add the text areas and submit button, o and its been started in HTML so anyother coding will need to be complient

  2. IDG Tech News

  3. #2
    soveryapt's Avatar
    Join Date
    Jan 2009
    Location
    Lancashire
    Posts
    1,711
    Thank Post
    325
    Thanked 183 Times in 162 Posts
    Rep Power
    47
    Using a bit of PHP you should be able to grab the computer name using something like:

    PHP Code:
    $computername gethostbyaddr($_SERVER['REMOTE_ADDR']); 
    and then echoing the variable into a hidden field in your form. That assumes you have a working DNS Server on site obviously. I've not tested it, but if I get chance I will do.

    Not sure how you might go about the username though.

  4. #3
    tommccann's Avatar
    Join Date
    Jun 2009
    Posts
    252
    Thank Post
    46
    Thanked 39 Times in 31 Posts
    Rep Power
    0
    Well username isnt very important, its just so i know whos using the webform

    cheers

  5. #4
    tommccann's Avatar
    Join Date
    Jun 2009
    Posts
    252
    Thank Post
    46
    Thanked 39 Times in 31 Posts
    Rep Power
    0
    o and also how do you add php into a html site on dreamweaver??

  6. #5
    DrPerceptron's Avatar
    Join Date
    Dec 2008
    Location
    In a house
    Posts
    670
    Thank Post
    19
    Thanked 84 Times in 70 Posts
    Rep Power
    28
    Grab username for intranet?

    That's only an IIS based solution, I have no idea if you can use Linux to do the same thing... I rolled back over to IIS simply because I couldn't figure out how to do it using Apache.

  7. #6
    soveryapt's Avatar
    Join Date
    Jan 2009
    Location
    Lancashire
    Posts
    1,711
    Thank Post
    325
    Thanked 183 Times in 162 Posts
    Rep Power
    47
    And then for the next bit (sheesh .. I would save some time if I read and replied to the whole post where I could! lol)

    PHP Code:
    //define the path to your file
    $myFile = ./path/to/filename.txt

    //now to open your file (or say you can't) and save it as a variable
    $filestorage fopen($myFile'w') or die("can't open file");

    //now to write your old file back and the new data from the form (repeat the ", $_REQUEST['fieldnames']" for each field you have.  The "\n" puts a line break in.
    fwrite($filestorage$_REQUEST['fieldnames']."\n");

    //and to close your file
    fclose($filestorage); 
    In terms of putting PHP into Dreamweaver, any php should be contained within the tags:

    <?php

    ?>

    You would have to set your form action to being pointing to a PHP file that has in the parsing things (there are plenty of useful things on Google for setting up form scripts and the like).

    Of course, the other thing to make sure is that you have PHP installed on your webserver (so if using IIS then you can install PHP onto it either using the nice new tools from Microsoft or by googling for how to do it.

  8. #7
    tommccann's Avatar
    Join Date
    Jun 2009
    Posts
    252
    Thank Post
    46
    Thanked 39 Times in 31 Posts
    Rep Power
    0
    yea php server is not installed on the server and cant be sadly, this is why i wondering if php was possible. its meant for a local machine and saves to the hard drive, maybe javascript??

    thanks for the replies and effort!!

  9. #8
    soveryapt's Avatar
    Join Date
    Jan 2009
    Location
    Lancashire
    Posts
    1,711
    Thank Post
    325
    Thanked 183 Times in 162 Posts
    Rep Power
    47
    No worries, there's always WAMP if you have local admin rights and it's just for one machine. That will install a local webserver you could use (even share to other machines if you really wanted).

    Java, well, I google for scripts and credit. Never did really get my head round that one! lol ..

SHARE:
+ Post New Thread

Similar Threads

  1. Dreamweaver 8
    By NikChillin in forum Educational Software
    Replies: 0
    Last Post: 21st April 2009, 11:51 AM
  2. Dreamweaver On A Network
    By rasssp in forum Educational Software
    Replies: 2
    Last Post: 11th June 2008, 11:59 PM
  3. Dreamweaver
    By laserblazer in forum General Chat
    Replies: 6
    Last Post: 31st May 2008, 01:57 PM
  4. need help with Dreamweaver
    By Ajax in forum Coding
    Replies: 2
    Last Post: 15th May 2008, 06:38 PM
  5. Problem With Dreamweaver MX
    By clarky2k3 in forum Windows
    Replies: 4
    Last Post: 30th January 2008, 10:39 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •