Click to See Complete Forum and Search --> : [RESOLVED] $_REQUEST issue php5, no doubt simple
KiwiDexter
Jan 20th, 2008, 05:59 PM
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
visualAd
Jan 21st, 2008, 04:23 AM
Is the input element withing a form tag? Also check the HTTP request by using echo(file_get_contents('php://stdin')).
visualAd
Jan 21st, 2008, 04:24 AM
It probably won't make a difference but you should remove as </input> tag, it is not required.
KiwiDexter
Jan 21st, 2008, 05:31 PM
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.
visualAd
Jan 22nd, 2008, 01:18 AM
It is bettter to use a single tab which is it's self closed:
// 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.
KiwiDexter
Jan 23rd, 2008, 06:45 PM
It is bettter to use a single tab which is it's self closed:
// 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:
visualAd
Jan 23rd, 2008, 07:00 PM
CSS is an excellent option then.
KiwiDexter
Jan 23rd, 2008, 07:02 PM
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 ...
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.