[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
Quote:
<tr>
<td>Dummy</td>
<td><input type=text name=movietitle size=100></input></td>
</tr>
post submit code
Quote:
$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
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')).
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.
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 :blush: also replaced all the $_REQUEST with $_POST as the gurus were telling me that's more php5ish :D
The closing tag is in there as we are trying for xhtml compatiability or something. Yeah not needed but desirable for some unknown reason :confused:
Okay off to ask the next question.
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: " --> " > --> > & --> &.
- 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.
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: " --> " > --> > & --> &.
- 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 :eek: One of the requiements is to ensure it can be templated and to have multiple template options ... LOL:sick:
Re: [RESOLVED] $_REQUEST issue php5, no doubt simple
CSS is an excellent option then.
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 ...