473,811 Members | 2,665 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

using meta http-equiv in php

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

id="test2" name="registrat ionform">

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?fi rstname=$firstn ame'> "); 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?fn ame=$fname'> ");
redirectingthep age();
exit;

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

"); is not executed the redirectingthep age() 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 redirectingthep age() function, i do not want this to happen. i would like what is written

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

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

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

thanks.
Mar 9 '08 #1
2 2047
TheServant
1,168 Recognized Expert Top Contributor
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 Recognized Expert Expert
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
3558
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 keyword meta-tags. If you are missing any of these meta-tags you are missing the boat. If you use the following meta-tag formula, and you are not trying to deceive the spiders, I guarantee you will succeed in increasing your placement in the...
8
6026
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 ASP.NET tags and HTML tags. <%@ Page Language= etc...
5
3168
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 the code variable that are supposed to be linked to the contained controls. It runs fines when everything is contained in a single web form project. What do I need to do to make it work from a class library?
5
2155
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
1291
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 code: using System; using System.Collections; using System.ComponentModel; using System.Drawing;
1
1852
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
3723
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 javascript confirm popup to this checkbox server control to prevent this event from firing if the cancel button is checked in the js confirm window. In the example below, I am able to accomplish this using the input type=checkbox but without the...
2
6416
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 field to change from a "1" to a "0" (and vica versa). I have the bindings worked out, I just can't figure out how to do the update. Here is my source:
1
7357
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 whatever they want ... i dont need to do any special formatting just a straigh ot pivot tables usign sql server, asp.net, vb.net, OWC 10
3
1335
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 page and the center part is another file which is called using include("links.php") and the bottom part using include("footer.php") the footer has links such as = webdevelopment software development ... each of this has a query string=...
0
9607
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10408
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9211
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7673
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6895
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5561
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4346
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3874
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3026
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.