473,395 Members | 1,681 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,395 software developers and data experts.

using meta http-equiv in php

i have a registration page which is a self submitting form <form action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="POST"

id="test2" name="registrationform">

where in a user fill a form, after the data has been inserted to a database i would like to redirect the user to a different

page. i am not able to use header(Location: filename.html) as i have echo statements before and i get a message that headers

have already been sent. so due to this i am using

echo (" <meta http-equiv='refresh' content='0;url=thankyou.php?firstname=$firstname'> "); this works perfectly fine.

however if a user disables meta refresh which is a very small possibility the above meta tag would not execute to avoid such

a situation i would like to use echo statements to create a new page which would have html tags and display a similar page to

thankyou.php


in my case the php code is placed in the middle of the page which displays messages that a user did not enter in the form.


the page is so structured that there is some information written using html tags followed by the registration questions where

the php code is present to validate. i have used

echo (" <meta http-equiv='refresh' content='0;url=thankyou.php?fname=$fname'> ");
redirectingthepage();
exit;

i have used the above code so that even if the echo (" <meta http-equiv='refresh' content='0;url=thankyou.php?fname=$fname'>

"); is not executed the redirectingthepage() function will be executed.


my question is due to the structure of the page whatever text is present before the form that text is appearing again

followed by the text i have inside redirectingthepage() function, i do not want this to happen. i would like what is written

in redirectingthepage() function only to appear. i have defined redirectingthepage() function in a separate file and i am

calling the file which has redirectingthepage() function by using include statement in the registration page.

please advice how i can display what is defined in redirectingthepage() function ONLY if the refresh is disabled by the user

thanks.
Mar 9 '08 #1
2 2009
TheServant
1,168 Expert 1GB
I am guessing if someone has disabled meta-refresh they did it for a reason, so you want to honour their wishes. How about firstly displaying "meta-refresh must be enabled to register" or something. Secondly, you can echo a line if the form has been submitted: "If your browser does not refresh, <a href...>click here</a>."

I guess what I am saying is you don't want to bypass someone's settings, neither do you want to force them to enable something that they want disabled. You need to give them some options.
Mar 9 '08 #2
Markus
6,050 Expert 4TB
TheServant is right, and that's exactly how i would do it.
Mar 10 '08 #3

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

Similar topics

24
by: Day Bird Loft | last post by:
Web Authoring | Meta-Tags The first thing to understand in regard to Meta Tags is the three most important tags placed in the head of your html documents. They are the title, description, and...
8
by: Kathleen Dollard | last post by:
Hi, Oleg's answer about attribute value templates led me to look back at a different problem, and wonder if someone else had solved it. I want to output an ASP.NET page. Thus I need to output...
5
by: Marcel Gelijk | last post by:
Hi, I am trying to create a User Control that is located in a seperate class library. The User Control contains a textbox and a button. The page generates an exception when it tries to access...
5
by: ElanKathir | last post by:
Hi ! I wrote one code for Send the E-mail, But that code have some problem , So please help me Here i paste my code and Error: Error: Server Error in '/Elan_Sample' Application. ...
0
by: Mark Goldin | last post by:
I am trying to put together a small project where I will learn how to embed win controls in apsx pages. So far I got some code. When I run an aspx page nothing is shown on the page. Here is a class...
1
by: Asha | last post by:
greetings, i need to upload an .xls file using a secure connection. so i though of using https... can i know how this can be done?
0
by: Chris Fink | last post by:
My goal is to have an ASP.NET checkbox server tag with it's autopostback set to true, that when clicked will run the checkbox's CheckedChanged event. However, I would like to try to add a...
2
by: Nu2ASP.NET | last post by:
What I am trying to do is essentially 'flip' the bits, when the user clicks in the checkbox. For example, if the CheckBox appears checked, and the user un-checks it, I want the underlying data...
1
by: kingster | last post by:
Hi, I have a regular dataset and all i want to do is make a pivot table display in a browser with the datasource of the pivot table to be this dataset and then the end-user will be able to do...
3
by: runway27 | last post by:
i am doing seo for a website and this website uses a lot of php for which i need suggestions. this is how the website is set up. in the index.php file there is a flash banner at the top of the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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
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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...

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.