Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Header Problem - Insert The Info Below And Then Jump Back To A Page.


i want to insert the info below and then jump back to a page. Here is insert and the header statement: PHP Code:




View Complete Forum Thread with Replies

Related Forum Messages:
Send Header Info To A Page, Retrieve Response And Send That As Header
I am sending a header to page.html from sender.php using fgets(). I am then trying to retrieve that page's response, and set that as a header in sender.php in order to set any cookies etc.... that page.html might want to set. Right now I am using the following code:

View Replies !
Header('Location:') Jump Ignored?
I'm seeing a problem that has me flummoxed. The only thing I can
think of is that I'm violating some rule I don't know about.

I have some code that does some processing and then does a
header('Location: ...) jump to page A on success or falls through to
the jump to page B. This is the code:

if ( mysql_query( 'LOCK TABLES tableX WRITE', $link ) )
{
mysql_query( $q, $link ) ; // store the record
$ID = mysql_insert_id( $link ) ; // save the new id

if ( mysql_affected_rows($link) == 1 )
{
unlock_tables() ;
$_SESSION['ErrMsg'] = 'New ID is ' . $ID ;
header( 'Location: PageA.php' ) ;
$_SESSION['ErrMsg'] .= ' Error: ignored jump' ;
}
else // the store failed
{ error handling }
}
// second chance (for debugging) to do the right thing
header( 'Location: PageA.php' ) ;
$_SESSION['ErrMsg'] .= ' and it ignored it AGAIN!' ;

// and we shouldn't get here at all -- but we do!
header( 'Location: PageB.php ) ;


Unfortunately, as I know from the telltales I stuff into session, the
store works but the interpreter ignores both header calls that would
jump to A and finally jumps to B instead. Unless I'm more tired than
I'm aware, or more ignorant, this doesn't make sense.

View Replies !
Header - Jump Menu Does Nothing In IE
I have a php header and php footer that are being called into my content pages. In the php header, I have a jump to menu system. The jump to menu works great in Firefox, however, the jump menu does nothing in IE. Have any of you experienced problems with jump to menues in php headers and whatnot?

View Replies !
Jump To Section Of Same Page
PHP Group,

How can I in PHP, based on a result, move the cursor to a certain location
on the page? I want the same result as Anchor tags in HTML. I want to go to
a certain section of the same page based on a return result in PHP. What
this is for is an order forms page - when a user fills out a section
incorrectly, I want the page to display at that location in the form after
the user presses a submit button.



View Replies !
Jump To Html Page
I am a php newbe and I am trying to figure out how to simply display an existing html page from my php script. Here is the code I use but I get the normal "output started" errors.

$sql = "INSERT INTO author SET
firstname='$name1',
lastname='$name2',
workphone='$workphone',
email='$email',
loginid='$loginid',
password='$password'";
if (@mysql_query($sql)) {
header("Location: formSubmit.htm"); <--------HERE

View Replies !
Jump Menu Call Page
Is it possible to use a jump menu to call a page within a page? To be clearer. I can place an " include ('whatever.php'); " within my page which is fine. But i would like this include to be a variable set by the options within a jump menu. So when I select from the menu the include will swap from its default to the newly selected one. Am I making sense?

View Replies !
Hitting Back, Form Info Not Passed On
I have a form that will retrieve information from a database based on variables passed in a link. Order=17 would pass on the order number which is used to connect to a MySQL database. Now, if I hit back on a browser after opening one form page up already and click on a new link, say &order=18 the form will load blank without anything filled in, so basically it seems like it didn't connect to the database or didn't make use of the order=18. I call upon these using a GET method. Here's something that me be of issue, the form is filled in if this condition is met:

if ($_GET['firstTime']='YES' && $_SESSION['second']!= 'true')

View Replies !
Memory Size Exhausted Error - Too Much Info Back From Query - What To Do?
I changed one of my MySQL search queries to allow a situation where the user
gets much more information returned.

However, it has now given me the error message:
Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to
allocate 42 bytes) in /usr/share/pear/DB/mysql.php on line 290

OK I understand what this means (I assume) that the program is trying to
allocate more memory to return my query result but it wont let it.

However, I need this query to return this info, so what can I do?

View Replies !
How To Prevent Back Button From Resubmitting Form? - Resend The Cached Info
However I found a problem in it. When I log out from the secure contents (a button for logging out is placed there), if I hit the Back Button, the browser (IE6) asks me if I want to resend the cached info and if I hit yes,

the browser resends the Form data, in this case, the "previously input User ID and Password", and I am logged in again and the secure contents are showing again!

I don't want this to happen. Suppose I just logged out from the secure contents session, the browser returned to the log in screen. I left the computer and another user came and hit the Back button and he would see all my secure contents! Code:

View Replies !
How To Get Header Info
I've been trying to extract the status codes from http header information to find whether a page is 200 ok or 404 not found by using an fsock() connection which works. To actually extract the data what do you use? i've seen fputs() and fgets() listed on the documentation page but how do these function actually work?

View Replies !
Receiving Error Codes Back From Header()
I need to write a script that goes out periodically and checks to see if a website is up and running. I was going to use:

header(location: http://www.example.com) ;

is there a way to find out if the function completed successfully?

View Replies !
Script Cannot Add Header Info
This is a contact us script that sends an e-mail to me with the the three fields i made e-mail,name and message. The script is supposed to bring the user to a thankyou page after submitting. but for some reason i get this error cannot add header info headers already sent. here is the PHP code:

View Replies !
Retrieve Header Info ?
I'm looking for a way to retreive header("location..."); info from external urls (assuming they are indeed using header("location..."); I was told to use fsockopen to open the url, and after that there should be a way to retrieve the header info, can anybody tell me exactly HOW I can retrieve that header info using fsockopen ?

View Replies !
Trouble Getting Header Info
I'm having trouble getting something simple working and can't see why.

This is the code I'm running:

<?php if ($row_Recordset1['type']=="agent"){

header("Location: agentindex.php");
echo "AGENT";
exit;
}

else
{
header("Location: llindex.php");
echo "LANDLORD";
exit;
}

?>

View Replies !
.wav File Header Info
Does anyone know how to extract the header information like duration, bit rate, audio channel configuration etc from a wave file?

View Replies !
Get And Insert Info Into Database
I have one table (form) that has multiple fields. Here are few fields we need to know: ID, NAME, CITY, STATE, PROFESSION, x, y, z (x, y, z means more than 50 fields that give me more information about each name).

The ID and NAME are unique and they don't change (each name has it's own ID). A NAME and its ID can be in any CITY, STATE or PROFESSION but this is fixed. That means if ID# 123 for Mr JOHN is Austin, TX, that will stay in Austin, TX for ever. I have more than 5000 NAME and it's ID, 9 professions, all US States and all Cities in my database.

Here is what I need to do:
I want to have a form on my site that my visitor finds his name first and then enters more information about him/her that will complete my database fields of x,y,z. What I'm thinking to do is to create a drop down list that the visitor first selects the profession. Based on the profession the second list shows the states that has that profession. Then by selecting the state, all the available cities will show up in the third list, and by selecting the city all the names related to that profession in that city, state will show up and he can select the name from the forth list. Then he enters other required information about him that will be send and saved in the database.

Here is what I have done and I know to do so far:
I have created the database with all the information in one table. I also know how to send data to database to be saved. But my problem at this point is how to create this list selection that narrows the search to find the right person.

View Replies !
How Do I Access The Raw Header Info Sent From A Browser?
I am wondering if there is a way to access the actual, unparsed header information that is sent from the browser to the server.
ex.:

POST /page.php HTTP/1.0
User-Agent: Frontier/5.1.2 (WinNT)
Host: somewhere.com
Content-Type: text/html
Content-length: 181

I know that there are a number of globals that can access parts of that like the user agent, but I can't find any global, or function, to just access that raw, unparsed information.

View Replies !
Browser Based Header Info
I am using Header("Content-Type:application/rss+xml"); it works fine with Firefox 2.0  not with IE and If i use only Header("Content-Type:text/xml"); it works fine with IE not Firefox. SO any way to solve this?

View Replies !
Page Expired After Going Back From Del. Pageto Form Page Where Comment Is Submitted..
i've made a submit comment form with php and mysql, the form has an action to itself with a hidden var like this: input type=hidden action=add

When i delete a comment on the page i go to a page called delete.php3 and there is a link with a javaline which goes -1 back in my history..

When ive added a comment, the comments page contains action=add and when i delete a comment, i want to click on the link to go back to the comment page, but then, it doesnt work and it says:

Page has expired.

I wondered how to deal with this kind of problems........

View Replies !
Page Has Expired Message In Between The Php Page When I Click Back In Explorer Menu
I have a php script page, which is basically quiz. Visitors (after login in
with their email address) are supposed to answer each question, and when
they click the button at the bottom, the next page will show which problems
they got right or wrong.

Now my visitors, after seeing some problems they got wrong, click Back
button at the Explorer menu, and if they do, they get the below message:
=========================
Warning: Page has Expired The page you requested was created using
information you submitted in a form. This page is no longer available. As a
security precaution, Internet Explorer does not automatically resubmit your
information for you.

To resubmit your information and view this Web page, click the Refresh
button.
========================
Below are the script that I am using. This scripts are after initial login
page, which asks for visitor's email address. I have authorized visitors
already in my MySQL table, and only the visitors whose email address is in
my MySQL table are allowed to login......

View Replies !
Insert Form Info Into Database
i am trying to enter info from a form into a mysql database. when i submit the form, a new row is created, but the information isn't contained in it? any thoughts? PHP Code:

View Replies !
Insert Info Into A Mysql Table
when trying to insert to a table info for a picture with a html link to another site on it i get the following error message:

counter INSERT error: 1064, You have an error in your SQL syntax near 'href=""www.mysite.com" target="_blank"><img src="/uploa' at line 1

the mysql code in my php script is below

$damn = '"<a href="www.mysite.com" target="_blnk"><img src="/uploads/mho.jpg" alt="We're here" /></a>"'
$c_insert = "INSERT INTO `timmy_config` VALUES ('pic4', $damn, 0)" or die('counter INSERT error: '.mysql_errno().', '.mysql_error());;

View Replies !
CURL'ing Post Vars And Header Info
Maybe someone can point me to a good tutorial on this, or give me a tip on solving this, being new territory for me.

I'm using PayPal for some ecommerce. An HTML form sends my variables to a PHP script I wrote that massages the data, inserts into customer and order tables, etc., then I use cURL to send PayPal post vars. That all works fine, but when the PayPal page loads, the URL of the page remains that of my script, thus all the relative links to images from PayPal are broken.

View Replies !
Mail Function Showing Header Info
I am using a standard mail function within an AMFPHP Class that i have used many times. Now, when i use it it does not work right. When a mail is sent, the $header info and html shows in the email.

I would like to know why the header info is showing in the email, along with why the HTML code is not rendering. I will post examples of code and result. Please provide a solution b4 i pull my hair out. Code:

View Replies !
Sessions And Redirects - Send Info From Page One To Page Two.
I have a two part form, each part on a seperate page. I want to send info from page one to page two. Thought ok, I use session variables. The problem is that they don't get sent to the second page. All works fine on my local testing server, but when I go live session varables don't show. Has this something to do with header? Is there another way to get to the second page? Code:

View Replies !
Email Me This Info Page From A Order Confirmation Page?
How do i make a "email me this info" page from a order confirmation page? Basically someone enters some info in a form, then on submission is comes to my email. After submission, i want to have a text area where they can enter an email address to have the info emailed to them if they wish. You can see the page here, you have to enter info first, the email nbox on the second page (process.php) is non fuctional.

View Replies !
Starting A Session Or Pulling Info Back From A Session?
I am taking the advice of a moderator and going to stop using Dreamweaver as a crutch for writing PHP apps. I have some questions about sessions and have been reading through some online tutorials, but have some questions that may seem simple stupid about sessions, but would appreciate some input. Do you have to put this at the top of each page on the site when using sessions to keep the sessions going from page to page or do you just put it on a page when you are starting a session or pulling info back from a session?

<?php
session_start();
?>

View Replies !
Header Not Working - If No Errors Does And Insert
In a script that looks for posted variables and then errors and if no errors does and insert. I have a problem with setting the page to forward.

If I use the header command:
header("Location: $u");

It does not work. However if I use meta refresh it does work:

print "<META HTTP-EQUIV="refresh"content="2;URL=http://localhost$u">";

The header command works properly on many pages.

I even tried an

exit;

after the header commant, but that does not work either.

View Replies !
Log In Page That Goes Back To REFERRING Page
I am using the following code to initialise a session, depending on
whether-or-not the users' log in attempt has been successful.

if ($session_ok == "TRUE") {
//open the session
session_start();
//assign user details to session
$_SESSION[txt_user] = $user_id;
$_SESSION[user_pass] = $user_pass;
$_SESSION[ses_state] = "TRUE";
header("Location: ../index.php");
}

as you can see the script then refers back to my index.php page, after the
session is ok'd.

What I would like to do is change this so that is goes back to the referring
page, instead of the index.php page, which requires the user to then
navigate to their previous page again.

I have attempted to use $HTTP_REFERER, although for me (on IE6) for some
reason their is no value in the variable!

View Replies !
I Want The Page To Go Back To My Login Page.
I want to logoff my application and I have set up a link to do this. I
got it to destroy my session, but I can't get the page to go to the top
of the browser and do a page refresh. Here is the code I am using.

First there is the link I am using.

printf("<a href="%s?logoff=%s">%s</a><br>", $_SERVER['PHP_SELF'],"logoff", "LOGOFF");

Here is piece I use right at the top of the script to destroy the
session and try to refresh the page.

if (isset($_REQUEST['logoff'])){
session_destroy();
$_SERVER['PHP_SELF'];
}

What do I have to do to get the refresh to work?

View Replies !
PHP To Insert Header TITLE And META TAGS
I'm trying to customise PHP pages by setting variables for the page Title and the Meta Tags for Description and Keywords.

I did this by creating three variables - $title, $description and $keywords at the head of individual pages, then inserting the following code into my header.php file which delivers the header and left column (nav) to each page of the site:

<title><?php echo $title ?></title>

and similar code for the meta tags for description and keywords.

No problems with Firefox, but in IE6 I get the $title printed at the top of the page instead of in the blue bar at the top of the browser.  Yet no meta tags are printed on the page - but they appear normally along with the title in the page source.

Is this a quirk in IE (which I loathe, but I know so many people use) or something I've done incorrectly in my code?

In ASP you can write <% =strTitle %>  but is there something similar in PHP that I haven't discovered yet?

View Replies !
Warning: Cannot Modify Header Information - Redirect From Login Page To Logged In Page
I am trying to redirect from login page to logged in page, but using the {header( 'Location: C:wampwww' ) ;} is giving me this error {
Warning: Cannot modify header information - headers already sent by (output started at C:wampwwwpassword.php:14) in C:wampwwwpassword.php on line 35}, find below my code:

View Replies !
'Back' Page After Logout
I'm using HTTP authentication as my login mechanism, and I'm having problems with the logout. It appears to work (as in I get the right message when I've logged out) but pressing the 'Back' button gives me the information on the previous page as though I hadn't logged out at all.

1) Does $PHP_AUTH_USER not get cleared when a "401 Unauthorized" is encountered?

2) Is there any way to force the logout to apply to previous pages (I'm thinking using sessions or cookies perhaps), or do I have to get the user to close the browser window?

View Replies !
Back To Html Page From Php
How do you go back to the html page you came in from from inside a php
script?

View Replies !
Back To Previous Page?
is it a way that we can have "go back" to our previous page? cos normally when we use back command in our IE or NS. we should have this error message appeared Warning: Page has Expired blah blah blah..

so how should I program so that i can "go back" e.g: i got two php, fromhere.php and cominghere.php is there anyway that i can do in order to reach the page "fromhere.php"?

View Replies !
Going Back To A POSTED Page
how can i stop the browser from warning the user that "Post Data" will be resubmitted... For example, on goolge you do a search, then click on a link, then clikc the BACK button in your browser, it dosn't give you the warning that you are going back to a page with posted variables?

View Replies !
Posting Back To The Same Page
I have a website that uses user authentication. The login does a post back to itself to check set usernames and passwords.

<?php echo $_SERVER['PHP_SELF']?>
sample url:  .../admin/login/index.php

This is working on a linux box where the end of the php code sends the page off to a ccc.php page for access checking. So after logging in on the index.php page, you eventually get returned to admin/ccc.php.

I reused the same code on a windows box and the .../admin/login/index.php takes me to .../admin/login/index.php/admin/login/index.php

does anyone have a clue as to what might cause this?

View Replies !
Does 'Back' Reload The Page?
I notice that when I click the 'Back' button my previous script runs, i.e, all the php code runs (I previously thought that maybe the previous form displays without the code re-running).
However, I do not get the expected value displayed on my form.

After populating one element in formA with &#3917;' (just any number) and submitting to formB (using POST ---> Redirect --> GET to avoid the 'expired from cache' message) I then click the 'Back' button and the 17 does not appear. In the code below, after clickng 'Back', I see as output from the echo statement that rb_value[0] is, infact, &#3917;' but within the form, the text element named rb_value[0] displays as empty.

Does anyone have suggestions why this might be?

It might have to do with that I do not understand what the 'back' button does. Or maybe with my PRG (post - redirect - get) model.

Here is part of the code:
echo "rb_value[0]=".$rb_value[0]; //After clicking 'Back' I see that rb_value[0] is 17

if (isset($rb_value[0])) {
$rb_val = $rb_value[0];
} else {
$rb_val = 1;
}

$line.= "<td width="20%" valign="center" align="left"> ";

// This element displays as empty instead of the expected 17
$line.= "<input type=text name="rb_value[0]" value="$rb_val" size="25" maxlength=25 </center> "
$line.= "</td> ";


View Replies !
Go Back To The Previous Page
is there any simple way of knowing which page within the site the user came from? Since after the user do something such as logging in and i want to be able to redirect the user back to the page from which he/she came from.

View Replies !
Redirection Back To The Page Before You Log In When You Log In.
how to do redirection back to the page before you log in when you log in.

View Replies !
Back To Last Page Viewed
i was wondering if php is capable of doing the following and if so was hoping i could get some help doing it. i have a wordpress blog and change the content of the sidebar depending if the page being viewed is part of the blog (home, archive, search, or single post) or an actual seperate page (like the about, disclaimer etc).

what i'd like is to have a link on the sidebar when viewing a page that says "back to blog" thats acts as a back button like in a browser, going back to the last page viewed. except what i want is for it to go back to any page that isnt a page, so basically the last blog page. um, does that make sense?

View Replies !
Page If Back Button
I have a php page which is a sign up page, once signup is finished the user is redirected to a new page. Sometimes (and it's rare) the user hit's the back button and then re-submits the form etc. I mean like I said it's rare but still bothers me, so on the last page I kill all the sessions. Which only works if the user hits the back button but the page is refreshed. So basically I want to know if it's possible that when the back button is hit to refresh a php page?

View Replies !
Insert A Page Break For Printing Purposes After X Records On Page.
I need to insert a page break for printing purposes after X records on page. I'm querying five diffrent records with 5 different results and displaying them like:

$record1
$record2
$record3 and so on

So I want to get total number of records which is pretty easy I just add all the totals let's call it $subtotal. Then I want a page break after every 20 records of the $subtotal. Is this possible?

View Replies !
Page Back Into Index's Iframe
On my index, I have a menu on the left with the rest of the page an iframe.How would I reinsert any pages found on the internet back into the index's iframe using php?

View Replies !
Ob_start() And Going Back To The Previous Page
1. How do I go back to the previous page using PHP?

For example, I have a log-in process which validates username and password of members, and also retricts access to certain pages. So if a member goes into a page without logging in, the member will be presented with a form to log in. How can I make my script go back to the previous page they were trying to access prior to logging in?

2. What would happen if I use ob_start and ob_end_flush() on every page that I have? Would it affect loading time? Or would loading time be the same except that it would cache everything first? Isn't that suppose to make it appear that the page loads fast?

View Replies !
Login, Then Go Back To Last Visited Page
I have a form that calls login.php, and the form can be included allmost every where in my site, for login purpose. But as soon as the login verifies.. the browser is redirected to one sertaint page. PHP Code:

View Replies !
Back A Page In Browser History
Is there a PHP snippet that will take a user back one page in browser history, or is everyone still using the JavaScript equivalent?

View Replies !
Navigation Back To An Html Page
I can't seem to figure out how to navigate back to an html page from a php page.

View Replies !
How To Redirect A User BACK To The Page
how to redirect a user BACK to the page they were trying to access while not being logged in, AFTER they log in.

for example, i try to access page1.php, but i am not logged in so a header("Location: login.php"); directs me to the login page. then i login, and the script redirects me back to page1.php...

i tried this using the $SERVER['HTTP_REFERER'] variable but it doesnt give a value unless the user CLICKS on a link to the next page (redirecting using headers doesnt work)

View Replies !
Back Button, Page Expired, GET And POST
I have read you can solve the back button problem with the page expiration by using GET method instead of POST. When I use the GET method with form data, it doesn't work.

I have a page with a dropdown submitting to a page getting the variable via POST. Then it links to another page, and I want them to be able to come back to the second page. When I use GET instead of POST I get an error.

View Replies !
Refresh Page After Hitting Back Button
I have a page with Dropdowns that are linked to a database.
After selecting one of the options and going to the next page, it will display the results of that dropdown item as pulled from the database.

If a user hits the back button, then selects a different option and hits "submit", what is listed is the results of the first selection AND the results of the second selection.
Is there a way to either:
1. Refresh the page upon hitting the back button on the browser
2. upon hitting the back button, the browser forgets the selection previouslly made.

View Replies !
Writing Pdf Docs And Going Back To The Previous Page
im trying to write a pdf document which contains two columns of data.
when the column on the left crosses over to the next page i need to be
able to go back afterwards to the previous page to write the content
for the right column.

currently im trying to do this with fpdf but it doesnt seem to allow me
to go back to the previous page once i have finished writing content
for one column that crosses over.

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved