komquat Posted December 13, 2006 Share Posted December 13, 2006 When I have the following for my form, it is not working, can someone help me with that<form method="post" action="$_SERVER[PHP_SELF]"> Link to comment https://forums.phpfreaks.com/topic/30424-_serverphp_self-not-working/ Share on other sites More sharing options...
hitman6003 Posted December 13, 2006 Share Posted December 13, 2006 what is the entire line of code?use[code]<?php echo '<form method="post" action="' . $_SERVER[PHP_SELF] . '">'; ?>[/code]or[code]<form method="post" action="<?php echo $_SERVER[PHP_SELF]; ?>">[/code] Link to comment https://forums.phpfreaks.com/topic/30424-_serverphp_self-not-working/#findComment-140067 Share on other sites More sharing options...
rajesh Posted December 13, 2006 Share Posted December 13, 2006 remove form tag in your code and paste the following content <form method="post" action="<?=$_SERVER[PHP_SELF]; ?>">i will be working in all my sites Link to comment https://forums.phpfreaks.com/topic/30424-_serverphp_self-not-working/#findComment-140072 Share on other sites More sharing options...
trq Posted December 13, 2006 Share Posted December 13, 2006 For starters its $_SERVER['PHP_SELF'] not $_SERVER[PHP_SELF], but really, you don't need it in this case.[code]<form method="post">[/code]will suffice. Link to comment https://forums.phpfreaks.com/topic/30424-_serverphp_self-not-working/#findComment-140073 Share on other sites More sharing options...
komquat Posted December 13, 2006 Author Share Posted December 13, 2006 Thank you, I got it working with out the action comment Link to comment https://forums.phpfreaks.com/topic/30424-_serverphp_self-not-working/#findComment-140081 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.