473,405 Members | 2,379 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,405 software developers and data experts.

PHP - How to recall 'this' PHP script

1
I am writing a PHP script generating a number of HTML form-based actions that recalls the same script with different parameters - this works fine as I can name 'this' script in the HTML form's action parameter.

However there is an occasion that I (re)call the script with parameters that cause an action to take place. When this is complete no further user input is required before I want to run the script again with no parameters to carry out the first-time-through actions again.

I understand that $_SERVER['PHP_SELF'] contains the name of 'this' script but I do not know how to get PHP to call it. I imagine that I also need to stop the current execution of 'this' script with an exit()

Can anyone help, please.

Beano
Jan 11 '07 #1
1 3540
ronverdonk
4,258 Expert 4TB
There are several ways to call 'this' script.

1. form in HTML code:
in HTML code: [php]<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST">[/php]
2. forum generated in PHP code:
[php]echo '<form action="$_SERVER['PHP_SELF']" method="POST">'[/php]
3. 'independent' call: [php]header("Location: ".$_SERVER['PHP_SELF']);[/php]
It is always sensible to terminate the script with an 'exit;' statement.

Ronald :cool:
Jan 12 '07 #2

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

Similar topics

3
by: Carlos Marangon | last post by:
Hello! I need some help. How can I recall the last 5 rows from a MySQL table and show them? Where is the FAQs of this newsgroup? Sincerely,
2
by: Jochem | last post by:
Hello, Lately I came accross this problem a couple of times, and I know there must be a clever solution. However, I did not find it untill now. When I add a entry to my mysql database from a...
1
by: BjoernJackschina | last post by:
Hello, is there a possibility to recall a page in which I had entered a password before with a hint that it was the wrong password. Many thanks
2
by: Prabhu Ram Prasath | last post by:
I have a series of 5 or 6 pages each containing some 10 or 12 text box controls. I need to recall the input given in first page at the last page. How should I use the viewstate collection to...
3
by: Velhari | last post by:
Hi all, Please tell me how to recall the PhP Program to execute the process after it is submitted the contents into another PhP Program....... I have used Javascript to acheive this but...
3
AsSeenonTV
by: AsSeenonTV | last post by:
Hey there! I will admit I am new to these Message Boards and to Visual Basic 6, but I am an experienced programmer when it comes to Visual Basic for Excel. Now with working with Excel, I am able...
0
by: Maninder Karir | last post by:
Hi, I have defined some lists in excel (using ctrl + F3). How can i recall these lists to a combobox? Thanks
1
by: artev | last post by:
in short to can insert in a page one file js that recall onother js page Insertion Indirect if have site/test.php site/file1.js site/a/b/file2.js and want file2.js inner file1.js and it...
1
by: Maciej Gawinecki | last post by:
Two questions related to the topic 1. If I have an empty set of relevant results, then it would be better to have no answers from the system at all. But neither precision nor recall gives...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.