Page 3 of 6 FirstFirst 123456 LastLast
Results 21 to 30 of 55

Thread: Need PHP Code

  1. #21
    Join Date
    Aug 2006
    Posts
    28
    Tokens
    0

    Default

    Quote Originally Posted by Sygon. View Post
    Make sure you use some sort of frame to display the input and output seperatly
    Like an iframe?
    Ima rider.

  2. #22
    Join Date
    Aug 2006
    Posts
    282
    Tokens
    0

    Default

    Fujitsu, still dont work, it just loads a blank page, but stil submits to the shoutbox

    Edit: If someone could just type out the whole code and make it work i would be greatful..

    Also why i am here, could anyone post a code to disable HTML in the form fields ;P
    Last edited by Drugs; 08-08-2006 at 09:17 PM.

  3. #23
    Join Date
    Aug 2006
    Posts
    28
    Tokens
    0

    Default

    Lolz, coz i pwnt it :p
    Ima rider.

  4. #24
    Join Date
    Aug 2006
    Location
    United Kingdom
    Posts
    207
    Tokens
    0

    Default

    In your HEAD tag add

    Code:
    <script type="text/javascript">
    	function blank () {
    		var name = document.FORMNAME.FIELD NAME;
    		var message = document.FORMNAME.FIELD NAME;
    
    		if (name.value == "") { 
    			window.alert("Please fill in your name."); 
    		}
    		
    		if (message.value == "") { 
    				window.alert("Please fill in a message."); 
    		}
    	}
    </script>
    And In Your <input> tag add

    Code:
    onclick="blank();"
    The code I posted before wouldnt work, so I edited it.
    Last edited by Fujitsu; 08-08-2006 at 09:24 PM.
    PHP Code:
    [LEFT]<?[/LEFT]
    [
    LEFT]$name $_GET['name'];[/LEFT]
    [
    LEFT]echo "Hi, your name is $name";[/LEFT]
    [
    LEFT]?>[/LEFT]
    [LEFT][/LEFT]

  5. #25
    Join Date
    Aug 2006
    Posts
    282
    Tokens
    0

    Default

    Fujitsu and in which file am i putting that in?

  6. #26
    Join Date
    Sep 2005
    Posts
    1,604
    Tokens
    0

    Latest Awards:

    Default

    Lmao you really havent got a clue have you

  7. #27
    Join Date
    Aug 2006
    Posts
    282
    Tokens
    0

    Default

    I presume in the shoutbox.php file but i am jsut making sure.

  8. #28
    Join Date
    Aug 2006
    Posts
    28
    Tokens
    0

    Default

    Yeh, it is.
    Ima rider.

  9. #29
    Join Date
    Aug 2006
    Location
    United Kingdom
    Posts
    207
    Tokens
    0

    Default

    Yes. *Longer Post*
    PHP Code:
    [LEFT]<?[/LEFT]
    [
    LEFT]$name $_GET['name'];[/LEFT]
    [
    LEFT]echo "Hi, your name is $name";[/LEFT]
    [
    LEFT]?>[/LEFT]
    [LEFT][/LEFT]

  10. #30
    Join Date
    Aug 2006
    Posts
    282
    Tokens
    0

    Default

    For this bit;

    onclick="blank();"

    Where do i put that??

Page 3 of 6 FirstFirst 123456 LastLast

Posting Permissions

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