Results 1 to 8 of 8

Thread: [RESOLVED] $_REQUEST issue php5, no doubt simple

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2007
    Location
    Godzone, oops Oz
    Posts
    355

    Resolved [RESOLVED] $_REQUEST issue php5, no doubt simple

    Any one able to help. Been given an existing web app to convert to another product, open source etc, and been a while since I have touched php in any form.

    Calling Form

    <tr>
    <td>Dummy</td>
    <td><input type=text name=movietitle size=100></input></td>
    </tr>
    post submit code


    $movetitle = $_REQUEST["movietitle"];
    $movetitle isn't picking up the data though other variables are picking up values from other similar code statements

    And before anyone says anything, yes I know it's pretty dumb web stuff but we want to get the functionality working before introducing div and CSS etc in a second iteration.

    Yes the end product will be available as free open source etc.

    TIA

  2. #2
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: [RESOLVED] $_REQUEST issue php5, no doubt simple

    Is the input element withing a form tag? Also check the HTTP request by using echo(file_get_contents('php://stdin')).
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  3. #3
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: [RESOLVED] $_REQUEST issue php5, no doubt simple

    It probably won't make a difference but you should remove as </input> tag, it is not required.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2007
    Location
    Godzone, oops Oz
    Posts
    355

    Re: [RESOLVED] $_REQUEST issue php5, no doubt simple

    Quote Originally Posted by visualAd
    It probably won't make a difference but you should remove as </input> tag, it is not required.
    Thanks for the reply, but turned out to be a slight spelling issue with the variable name also replaced all the $_REQUEST with $_POST as the gurus were telling me that's more php5ish

    The closing tag is in there as we are trying for xhtml compatiability or something. Yeah not needed but desirable for some unknown reason

    Okay off to ask the next question.

  5. #5
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: [RESOLVED] $_REQUEST issue php5, no doubt simple

    It is bettter to use a single tab which is it's self closed:
    Code:
    // this
    <input type="text" name="name" />
    
    // is the same as this
    <input type="text" name="name"></input>
    Anyway the above is not XHTML compatible. Just as a stater this is what you must do:
    • Tag names and attribute names alll lower case.
    • All attribute values enclosed in quotes either ' or "
    • All open tags with close tags i.e: <p></p> <option></option>
    • All meta characters within text escaped, i.e: " --> &quot; > --> &gt; & --> &amp;.
    • The XML delcaration and XHTML doctype at the top.
    • All inline scripts and style sheets with full mime types.


    Also ditch the table - they are not for presentation, use CSS. Tables are for tabulated data.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2007
    Location
    Godzone, oops Oz
    Posts
    355

    Re: [RESOLVED] $_REQUEST issue php5, no doubt simple

    Quote Originally Posted by visualAd
    It is bettter to use a single tab which is it's self closed:
    Code:
    // this
    <input type="text" name="name" />
    
    // is the same as this
    <input type="text" name="name"></input>
    Anyway the above is not XHTML compatible. Just as a stater this is what you must do:
    • Tag names and attribute names alll lower case.
    • All attribute values enclosed in quotes either ' or "
    • All open tags with close tags i.e: <p></p> <option></option>
    • All meta characters within text escaped, i.e: " --> &quot; > --> &gt; & --> &amp;.
    • The XML delcaration and XHTML doctype at the top.
    • All inline scripts and style sheets with full mime types.


    Also ditch the table - they are not for presentation, use CSS. Tables are for tabulated data.
    Thanks.

    The table is from the original product I inherited to push into php5, it doesn't even have CSS One of the requiements is to ensure it can be templated and to have multiple template options ... LOL

  7. #7
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: [RESOLVED] $_REQUEST issue php5, no doubt simple

    CSS is an excellent option then.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  8. #8

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2007
    Location
    Godzone, oops Oz
    Posts
    355

    Re: [RESOLVED] $_REQUEST issue php5, no doubt simple

    Quote Originally Posted by visualAd
    CSS is an excellent option then.
    Will definitely be using divs except for title list which are tabulated.

    CSS simply has to be used to save time down the track when everyone decides what changes they want from the beta1 release ...

Posting Permissions

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



Click Here to Expand Forum to Full Width