Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Nov 2005
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Posting HTML Code from script

    Ok, can this be done.

    I need to post from a php script several text fields that have normal text, but I also need to post some HTML code which consists of a table and hyperlinks as well.

    - First can HTML Code actually be posted from a normal HTML form?
    - Whether or not it can be done from a HTML form can it be done from a php script? If so how do I go about doing this?

    I have tried to achieve it from an HTML form, but it seems to ignore the HTML code after the post and I'm left with just the text.

    Thank You.

  • #2
    Regular Coder
    Join Date
    Dec 2005
    Posts
    346
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Explain what you need again!!! Here is how you post HTML coding & table code using php...you will need to change everything to make if work with your form, but you only wanted to know how to make HTML display using php.

    PHP Code:
                echo '<TABLE border="0">';
                echo 
    '<TR><TH>First:</TH><TH>Last:</TH></TR>';
                    
                    echo 
    '<TR>';
                    echo 
    '<TD> Your input boxes go here!!!</TD>';
                    echo 
    '<TD> Your input boxes go here!!!</TD>';
                    echo 
    '</TR>';
                }
                
                echo 
    '</TABLE>'

  • #3
    New Coder
    Join Date
    Nov 2005
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well... I was under the impression that I could not get HTML tags and text to actually POST to another page from a form post. So I was trying to confirm this and to find out how to actually generate a post from a pure PHP coding (not an actual form).

    One site documenting HTML said it couldn't be done, but apperently they were wrong... or maybe under a certain condition it was true.

    I have figured out what to do now I think. I looks like I also needed the stripslashes due to magic_quotes and I found a site that showed how to generate a post from pure PHP code (not via a form).

    I am going to play with it tonight and see if I get it all and I'll post what I am doing and get some feedback.

    Thanks


  •  

    Posting Permissions

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