473,387 Members | 1,904 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

action in same page

i want know if i am giving the action in same page. then what the file name in action. Something one word "PHP-SELF". I am not conformed and i have used but error is showing something access forbidden and error no. 403. If anybody know very well please inform to right suggestion. thanks.
Mar 15 '07 #1
6 2993
DeMan
1,806 1GB
Someone in one of the web-related technologies on the Right Hand Side of the page may be able to help you (I'd try the PHP group first, I think)
Mar 15 '07 #2
MMcCarthy
14,534 Expert Mod 8TB
Someone in one of the web-related technologies on the Right Hand Side of the page may be able to help you (I'd try the PHP group first, I think)
This question is being moved to the PHP forum.

ADMIN
Mar 16 '07 #3
ak1dnar
1,584 Expert 1GB
Why don't you submit your coding here.
Normally You can set the action property like this:

[PHP]echo '<form action="'.$PHP_SELF.'" method="POST">';[/PHP]
This form will print by PHP, so i can't guess about your Form..
Mar 16 '07 #4
devsusen
136 100+
Hi,

I think this should work $_SERVER['PHP_SELF'] instead of $PHP_SELF.
Mar 17 '07 #5
ak1dnar
1,584 Expert 1GB
Hi,

I think this should work $_SERVER['PHP_SELF'] instead of $PHP_SELF.

Try this by your self by putting this in a single .php page.

[PHP]<?php
echo '<form name="PHP" action="'.$PHP_SELF.'" method="POST">';
echo '<input type="submit" name="click_php" value="PHP form" />';
echo '</form>';
if($_POST['click_php'])
{
echo 'This is from PHP form';
}

?>
<HTML>
<body>
<form name = "HTML" action="<? $_SERVER['PHP_SELF'] ?>" method="POST">
<input type="submit" name="click_html" value="HTML form" />
</form>
</body>
</HTML>
<?
if($_POST['click_html'])
{
echo 'This from HTML form';
}
?>[/PHP]
Mar 18 '07 #6
devsusen
136 100+
Hi,

From PHP 4.2.0 onwords directive register_globals went off. $PHP_SELF will ONLY exist if register_globals is on. So its always better to use $_SERVER['PHP_SELF'] or $HTTP_SERVER_VARS['PHP_SELF']. I prefer to use $_SERVER['PHP_SELF'].

susen
Mar 20 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Dave Martin | last post by:
I've successfully used CURL to maneuver around and through sites but a new site I've been trying to work with has got me stumped. To retrieve the data I'm trying to get a login is required. If...
1
by: Dave | last post by:
Hello I am running Windows XP Pro with IIS 5.1 intalled. When I submit a page to itself, it works. When I call another page in the form action, it doesn't. The original page seems like it...
5
by: bissatch | last post by:
Hi, I have been trying to come up with an idea to reduce double submissions where a user clicks refresh and, for example, another row is INSERT into a table. Originally, I would have a form...
10
by: iam247 | last post by:
Hi In my prototype asp page (with no javascript and no password validation, I have a registration form with the following action: <form name="form" method="post" action="RegDetails.asp"> ...
2
by: belgie | last post by:
Whereas in Asp I could submit my form contents to any other Asp page, it appears that in Asp.NET the primary Asp form will only submit to itself. I have tried changing the Action attribute in the...
12
by: TheOne | last post by:
In Asp.net web form under form tag there is action field that I am point to some other page, and not to same web form. When I run this page it is always pointing to itself. How do I get around...
10
by: Oliver Block | last post by:
Hello, does anybody no, which the default action is (if no action attribute value is assigned). I didn't find anything in the TR yet. Best Regards, Oliver
3
by: e name | last post by:
Hello, I am getting "Action Cancelled" message on an asp page which is running a process that takes more then 25 minutes. I have "Friendly error message" turned off on browser setting. And what...
10
by: Benton | last post by:
Hi there, I have a UserControl with a couple of textboxes and a couple of buttons ("Save" and "Cancel"). The Click event for this buttons is in the UserControl's codebehind of course, so here's...
4
by: sid | last post by:
Can someone tell me how to detect "Action Cancelled" page with out polling. I have a frame set and I want to make sure the other frame is displaying what it is supposed to without polling. For...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.