NYCPHP Meetup

NYPHP.org

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

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


I would love to put a group of W3C designers in the same room with PHP 
web application developers and call it "E-Survivor".  Dangit, where's 
Mark Burnett when I need him? I could make a FORTUNE!

Phil

Derek DeVries wrote:

>You are right about the single quotes, they can be used as well.
>
>I just did a test and it does in fact validate against the W3C
>http://validator.w3.org/check?uri=http%3A%2F%2Fwww.derekdevries.com%2Fdoctype.html&charset=%28detect+automatically%29&doctype=%28detect+automatically%29&ss=1&outline=1&sp=1&noatt=1&No200=1&verbose=1
>
>I based my last statement by something I saw on this page...
>http://academ.hvcc.edu/~kantopet/xhtml/index.php?page=xhtml+attributes
>but W3C wins.
>
>---------------
>Derek DeVries
>http://www.sportspyder.com
>
>
>----- Original Message ----- 
>From: "Phillip Powell" <phillip.powell at adnet-sys.com>
>To: "NYPHP Talk" <talk at lists.nyphp.org>
>Sent: Monday, April 26, 2004 10:14 AM
>Subject: Re: [nycphp-talk] Can't get no $action
>
>
>  
>
>>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
>>
>>
>>
>>_______________________________________________
>>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