|
Posted by passat91@sympatico.ca on 12/10/05 15:53
If this the case on $_POST and $_REQUEST mambo jambo, what happened to
the practical programming practices on reusing code? Here is my explanation.
Let say your existing projects in php are 100 and each project has 1000
code of lines. To be more realistic, let say you only have to modified
25% in one project, just to add this "$_POST and $_REQUEST" on every
line containing the word $variable. IMAGINE HOW MUCH TIME AND EFFORT A
PERSON WOULD SPEND EDITING EVERY SINGLE PROJECT. IMAGINE IF THERE ARE A
COUPLE OF THOUSANDS PHP FILE TO EDIT.
IS JUST BECAUSE PHP HAS A NEED TO PUT SHARPER FANGS, BIGGER CLAWS AND
MORE SPEED, IS NOT NECESSARILY EVERYBODY HAVE TO SUFFER.
Im wondering now if this is the same story in perl?
If not then im switching to perl.
I need some real answers. Thanks for any feedback.
passat91@sympatico.ca wrote:
> Wow, I was cracking my head last time figuring out the problem.
> This what happend, back in 2002 I was fooling around with php3 wiht all
> those code from php and mysql books, well they did parse perfectly.
> Now fast forward to 2005 WITHOUT TOUCHING PHP for 3 years, I got into
> this problem. WHAT A FITFALL!!!, Yes because I dont program much for a
> living.
>
>
> vdP wrote:
>
>> passat91@sympatico.ca wrote:
>>
>>> Could somebody tell me.
>>> I installed php4 successfully, but when I do run some script like the
>>> following:
>>> <?
>>> if(!isset($name)&&!isset($password))
>>> {
>>> //Visitor needs to enter a name and password
>>> ?>
>>
>>
>>
>> Starting with version 4.2.0, the post-variables are no longer imported
>> automatically, but are only stored in the array $_POST. To acces the
>> posted variables you need to use $_POST['name'], $_POST['password'],
>> etc. Alternatively you can assign the posted variables to normal
>> variables with something like
>> $name=$_POST['name'];
>>
>> Hope this helps.
>>
>> vdP
Navigation:
[Reply to this message]
|