Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: PHP help ...

  1. #1
    Join Date
    Jun 2004
    Location
    South England.
    Posts
    2,059
    Tokens
    1,508

    Latest Awards:

    Default PHP help ...

    Now, i'm not a fan of PHP - it's HTML, xHTML, sHTML, Java all the way for me but i decided that probably the most secure logins are PHP based, this being the case I set off on a mission to make a PHP login but came accross a little hitch that means it simply does not work - basically it only reads about 50% of the page as PHP and the rest it seems to assume is HTML =/

    For instance PHP_SELF should run the script to the current PHP page if i'm not mistaken? but instead this piece of code:
    <form action="<?=$_SERVER['PHP_SELF']?>" method="post">

    is intent on trying to find a page called:
    <?=$_SERVER['PHP_SELF']?>

    See, in HTML i'd assume that to happen as it's in inverted commas but... I assume PHP is meant to do something else? ... Lol. yeah so any help would be ... helpful x]
    Apparently I am not allowed to advertise my site any longer. T_T
    - Alex (Shenk).

  2. #2
    Join Date
    Apr 2008
    Posts
    58
    Tokens
    0

    Default

    Quote Originally Posted by vito201-:D View Post
    Now, i'm not a fan of PHP - it's HTML, xHTML, sHTML, Java all the way for me but i decided that probably the most secure logins are PHP based, this being the case I set off on a mission to make a PHP login but came accross a little hitch that means it simply does not work - basically it only reads about 50% of the page as PHP and the rest it seems to assume is HTML =/

    For instance PHP_SELF should run the script to the current PHP page if i'm not mistaken? but instead this piece of code:
    <form action="<?=$_SERVER['PHP_SELF']?>" method="post">

    is intent on trying to find a page called:
    <?=$_SERVER['PHP_SELF']?>

    See, in HTML i'd assume that to happen as it's in inverted commas but... I assume PHP is meant to do something else? ... Lol. yeah so any help would be ... helpful x]
    If its looking for <?=$_SERVER['PHP_SELF']?> then rename it to that..

    Should work..

  3. #3
    Join Date
    May 2005
    Location
    San Francisco, CA
    Posts
    7,160
    Tokens
    2,331

    Latest Awards:

    Default

    Quote Originally Posted by RyzerFoo View Post
    If its looking for <?=$_SERVER['PHP_SELF']?> then rename it to that..

    Should work..
    lol!

    Have you tried using the full syntax? (<?php) instead of using short-tags as your server might not have them enabled.

  4. #4
    Join Date
    Sep 2005
    Location
    East London
    Posts
    3,028
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by vito201-:D View Post
    Now, i'm not a fan of PHP - it's HTML, xHTML, sHTML, Java all the way for me but i decided that probably the most secure logins are PHP based, this being the case I set off on a mission to make a PHP login but came accross a little hitch that means it simply does not work - basically it only reads about 50% of the page as PHP and the rest it seems to assume is HTML =/

    For instance PHP_SELF should run the script to the current PHP page if i'm not mistaken? but instead this piece of code:
    <form action="<?=$_SERVER['PHP_SELF']?>" method="post">

    is intent on trying to find a page called:
    <?=$_SERVER['PHP_SELF']?>

    See, in HTML i'd assume that to happen as it's in inverted commas but... I assume PHP is meant to do something else? ... Lol. yeah so any help would be ... helpful x]

    <form action="<?=$_SERVER['PHP_SELF']?>" method="post">

    You have two ='s

    Its basically saying <form action==$_SERVER[PHP_SELF>

    And u could just use $PHP_SELF

  5. #5
    Join Date
    Apr 2008
    Location
    England.
    Posts
    1,324
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Jackboy View Post
    <form action="<?=$_SERVER['PHP_SELF']?>" method="post">

    You have two ='s

    Its basically saying <form action==$_SERVER[PHP_SELF>

    And u could just use $PHP_SELF
    Do you know what your talking about? He couldn't just use $PHP_SELF because the form wouldn't pick it up, he needs the = signs.

  6. #6
    Join Date
    Dec 2006
    Posts
    3,970
    Tokens
    0

    Latest Awards:

    Default

    Use full opening tags!

    <form action="<?php echo $_SERVER['PHP_SELF']?>" method="post">
    Lets set the stage on fire, and hollywood will be jealous.

  7. #7
    Join Date
    Apr 2008
    Location
    England.
    Posts
    1,324
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Tom743 View Post
    Use full opening tags!

    <form action="<?php echo $_SERVER['PHP_SELF']?>" method="post">
    Some servers don't read short tags thats why you should always use full tags kids!

  8. #8
    Join Date
    Jun 2004
    Location
    South England.
    Posts
    2,059
    Tokens
    1,508

    Latest Awards:

    Default

    So erm... what should I do? Lol >_> I'ma try each of the ideas see what happens ;D

    Quote Originally Posted by RyzerFoo View Post
    If its looking for <?=$_SERVER['PHP_SELF']?> then rename it to that..

    Should work..
    Er... >_> I think i'll ignore that comment...


    Quote Originally Posted by Invent View Post
    lol!

    Have you tried using the full syntax? (<?php) instead of using short-tags as your server might not have them enabled.
    No luck it now tries to find "<?php=$_SERVER['PHP_SELF']?>"


    Quote Originally Posted by Jackboy View Post
    <form action="<?=$_SERVER['PHP_SELF']?>" method="post">

    You have two ='s

    Its basically saying <form action==$_SERVER[PHP_SELF>

    And u could just use $PHP_SELF
    Nope, didn't seem to work D;

    Quote Originally Posted by Tom743 View Post
    Use full opening tags!

    <form action="<?php echo $_SERVER['PHP_SELF']?>" method="post">
    "<?php echo $_SERVER['PHP_SELF']?>" is now being looked for =[


    Could it be that the server i'm using doesn't allow some of the PHP code i'm using? ... anyone give me a good free-PHP site i can upload some stuff to and test out?
    Last edited by vito201-:D; 05-05-2008 at 08:30 PM.
    Apparently I am not allowed to advertise my site any longer. T_T
    - Alex (Shenk).

  9. #9
    Join Date
    Nov 2007
    Posts
    88
    Tokens
    0

    Default

    Try:
    <form action=\"<?php echo $_SERVER['PHP_SELF']?>\" method=\"post\">

    not sure though, don't know php.
    Do do do

  10. #10
    Join Date
    Oct 2006
    Location
    Peterborough, UK
    Posts
    3,855
    Tokens
    216

    Latest Awards:

    Default

    Yeah here's a tip:

    <form name="dongs" method="post" action=""> will do just fine.


    visit my internet web site on the internet
    http://dong.engineer/
    it is just videos by bill wurtz videos you have been warned

Page 1 of 2 12 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
  •