NYCPHP Meetup

NYPHP.org

[nycphp-talk] Can't get no $action

Phillip Powell phillip.powell at adnet-sys.com
Mon Apr 26 10:14:05 EDT 2004


No, you can use single quotes.  You can't use single quotes, however, if 
you want your resulting HTML to result to the rather narcissistic W3C 
standards, which, IMHO, mean 0.00% of anything.

Phil

Derek DeVries wrote:

>Only double quotes are compatible with the newest standard of XHTML.
>
>---------------
>Derek DeVries
>http://www.sportspyder.com
>
>
>
>----- Original Message ----- 
>From: "leam" <leam at reuel.net>
>To: "NYPHP Talk" <talk at lists.nyphp.org>
>Sent: Monday, April 26, 2004 9:36 AM
>Subject: Re: [nycphp-talk] Can't get no $action
>
>
>  
>
>>Dan Cech wrote:
>>    
>>
>>>leam wrote:
>>>      
>>>
>>>> From the editor_form function:
>>>>
>>>>    echo "<form name=edit_form method=post action=$PHP_SELF >";
>>>>    echo "<input type=hidden name=action value=save_file >";
>>>>    echo "<input type=submit value='Save and Exit' name=submit>";
>>>>        
>>>>
>>>It won't be causing the problem, but your html should be properly
>>>      
>>>
>quoted.
>  
>
>>Do you mean like:
>>echo "<input type=\"hidden\">";
>>
>>or can I use single quotes? Yeah, I'm still on the square part of the
>>learnin' curve...
>>
>>    
>>
>>>> From the switch statement:
>>>>
>>>>    switch($action) {
>>>>        case "save_file":
>>>>            save_file();               break;
>>>>        default:
>>>>            html_header();               editor_form();
>>>>            html_footer();
>>>>    }
>>>>
>>>>The save_file function works if it's called by itself, and the $action
>>>>just seems to call the default.
>>>>        
>>>>
>>>I would suggest that your server might have register_globals turned off,
>>>meaning you will need to use $_POST['action'] instead of $action.  You
>>>should do this anyway, rather than relying on register_globals.
>>>
>>>Dan
>>>      
>>>
>>Virtual Drink to you, that was it! Went to switch($_POST[action]) and it
>>worked.
>>
>>The book recommends register_globals be on but I've understood that is
>>not the best solution. However, I still get mixed up in their code
>>becasue they're using it that way.
>>
>>Thanks!
>>
>>leam
>>
>>_______________________________________________
>>talk mailing list
>>talk at lists.nyphp.org
>>http://lists.nyphp.org/mailman/listinfo/talk
>>
>>    
>>
>
>
>_______________________________________________
>talk mailing list
>talk at lists.nyphp.org
>http://lists.nyphp.org/mailman/listinfo/talk
>
>  
>


-- 
---------------------------------------------------------------------------------
Phil Powell
Multimedia Programmer
ADNET Systems., Inc.
11260 Roger Bacon Drive Suite 403
Reston, VA  20191
#: (703) 709-7218 x107 
Fax: (703) 709-7219

	




More information about the talk mailing list