473,385 Members | 1,333 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,385 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 2008
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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:
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...
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...

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.