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.





Delete Expired Queries


I had queries stored in mysql database according to queries
publication date (in format 2007-5-6, 2007-4-30 etc.). However, i
would like to implement automatic expired queries deletion after 6
months. For instance, 2007-4-30 released bulletin will be deleted
after it expired 6 months later. How do I peform this?




View Complete Forum Thread with Replies

Related Forum Messages:
Automatic Delete From MySQL Database Table Expired Records?
I have a question . . .

how can i delete from MySQL database table automatic expired records ?
?

One think is to make a service that deleting the expired records . . .

Any other method ?



View Replies !
Select & Delete Mysql Queries
i've try to insert and delete record at the same page, but it only can insert and can't delete the record. when i click submit button from the previous form, the record is insert into table B and delete from the table A. is the code correct? Code:

View Replies !
PostgreSQL Queries, Storing Results Instead Of Multiple Queries
I have a script that does multiple SQL queries.

So I have something like $result = pg_query($my_query);

After this query I tend to loop through like this to get the result:

while ($entry=pg_fetch_row($result))
{
 //do stuff
}

But my question is, how can I make a copy of the result? So I don't run the query more than once.

View Replies !
Do Queries On XML Similar To The Way That You Do Queries On MYSQL And Then Use The Results.
I am fairly familiar with PHP and MYSQL and I know a little about XML.

I would like to know if it is possible to do queries on XML similar to the
way that you do queries on MYSQL and then use the results.

An example of a simple PHP/MYSQL setup.

<?php
$user="username";
$host="sqlserver";
$password="password";
$database="database";
$connection = mysql_connect($host,$user,$password)
or die ("Couldn't connect to the server");
$db = mysql_select_db($database,$connection)
or die ("Couldn't connect to the server");

$query = "SELECT * FROM database WHERE(Criteria)";
$result = mysql_query($query)
or die ("Couldn't execute query.");

while ($row = mysql_fetch_array($result))
{
extract($row);
echo"Set of instructions to carry out for each row in the
result";
}

?>

The question is, is it possible to do similar things with PHP/XML?
Lets say that I have an XML file located at a certain URL and I want to run
a query on it and use the results.
1. Is it possible?
2. What is the easiest way to do it?
3. How would I translate the above code to work with XML?
4. Is ther resource on the web on how to structure the queries?

View Replies !
Delete Record - When The Delete Link Is Clicked The Next Page Is Blank And Nothing Is Deleted.
This is my "delete.php" and this "todo/delete.php?id=64" an example of a link to it generated from the index.php page. When the delete link is clicked the next page is blank and nothing is deleted. What have I done wrong?

<?
include("dbinfo.inc.php");

mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");

$id="delete from todo where id='$id'";
mysql_query($id);

mysql_close();
?>

View Replies !
Mysql Delete - $query = Mysql_query("DELETE
how would i do the following ?

$query = mysql_query("DELETE notes, datestamp, abs_value, ID FROM absence_mgt  WHERE datestamp='$date' AND ID='$vtc_login' ") or die(mysql_error());
im just getting "Unknown table 'notes' in MULTI DELETE" ?

View Replies !
The Page Has Expired
I have a form based shopping cart, and when you try to move back an error is returned...

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. When I refresh the webpage the form is blank, From what I gathered from this forum, I should switch from post to get, which I tried but also didn't work. I need my customers to be able to go back and forth if then need to.

I did not design the cart, and the program says my request can't be done, but I shop a lot on line and have always be able to back up and go forward without loosing the information I entered. My darn cart erases everything and I know darn well I am going to lose a lot a business as a result of frustrated shoppers.

View Replies !
Page Has Expired
I have a support section of my site for admin and there is a login with a user name and password. once logged in I have sess vars storing the user's info. The problem I am having is in IE if the Admin is logged in and on a page and hits back to make a change he/she is greeted by a page that says Warning: Page has expired.

View Replies !
Session Expired
I have problems about how to clear session data in c:/php/sessiondata. There are many unused session data which not be cleared by system automatically. How can I set session expired timeout.. so that once I close window (without logout) or leave it for long time.. the system will automatically clear it.

View Replies !
Expired Session.
on my page (status.php) there is information from a session. How can I tell once the session has expired? I want to redirect to login.php once the session expires.

View Replies !
Expired Sessions
I need some way for my code to be able to tell if a certain session ID is still valid. IE: they;ve closed their browser, or lost net connection, or whatever. How can I determine that?

View Replies !
Page Expired
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. Is there any way to fix that problem on one of my sites get that error when i use the back button?

View Replies !
Web Page Expired
Hitting the back button to a page that submitted and you get "web page expired"
Is there any way around that? Maybe with PHP headers?

View Replies !
File Expired
A demo script is showing this message after a certain date, if I go back
with os time settings it starts to work again.

Fatal error: This file has expired. in /var/www/index.php on line 0

How does the script do that ?

The apache conf of the script uses mod_expire, may the error be related to it ?

View Replies !
My Page Always Expired ?
I'm writing a website in PHP at home, no internet connection.Im using a single software that give me Apache server, PHP..I have a small forum,after user added a topic, I redirect him to homepage, then if he click back button in IE ,

IE will say that the page he requesting is expired ?:confused: It says that my page was created by infomation submitted in a form, to see that page it has to resubmit that information ?

I have tried with this forum, I answear in quick reply to a topic, it showed me my reply, then I go to another page on the menu, then I click back, the page is not expired ?I got the page before I posted my reply.

View Replies !
Session Expired Or Never Started?
I have some code at the top of each page that says session_start() then
checks for a value in the session. If the person never logged in the
session is empty and they get bounced to the login page. But if the person
has been sat at a normal page for 15 minutes after logging in,
session_start() works as if a session ID has not been presented, starts a
new session which is empty and the user gets bounced to the login page!

I feel like I've missed a step. How can I tell if a user doesn't have a
valid session ID because they've never logged in, or whether they don't
have a valid session ID because their session has timed out?

View Replies !
Session Has Expired Problem
i have a web page on which i put some radio buttons and when i click it, its value is displayed in textbox.when i click 2 radio,the 2 values will be addded and displayed in textbox[like shopping cart].

next if i click submit button it print's those values in second page and i want to take some user input on second page and then all the data will be stored in db.i did all this using sessions.it's working but when iam in second page,and when i click the browsers back button,to go to the radio buttons page and select some other options it is showing session has expired.how to solve this problem.

View Replies !
Warning: Page Is Expired
Can anybody tell me how to go on back page when using PHP Session. It give me Warning: Page is expired.

View Replies !
WIndows IE - Session Expired
I have been working on a script for a client and use sessions
variables. Clicking back in Windows IE displays the previous scripted
page as session expired. However, I do not get that error in Mac/PC
Fire Fox or Mac Safari. I am using this header code to prevent caching:

/* no cache */
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Pragma: no-cache");

Is there something I need to do differently for Windows IE to make
this work?

View Replies !
Page Has Expired Warning
I have seen several posts on this subject on the net, but no clear solution. I have a php page that presents a summary of 'objects', after which the user selects an object to see the 'detail' page of an object.  On this detail page there is a 'back to previous' hyperlink, which simply goes back 1 page in the history.

However, in this case, it always comes up with the Warning: page has expired first.
Since what I am trying to do is very standard and normal in PHP - is there anyway at all (without resorting to GET) to prevent this annoying behaviour?

View Replies !
Warning: Page Has Expired
Using PHP sessions on each page. At top of php pages have:

session_start();

Sessions work fine only when hit back browser button in IE get this warning:

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.

View Replies !
Page Has Expired Error
At the minute when you search my site it will produce a result, but if you click back, it says page has expired.

View Replies !
Session Time Expired
I have a probem when my code excute this pice of code:

switch(@$id)
{
case 1 :
if (@$_SESSION[level'] == 'ok')
{
do_header();
include_once("../../myrep/reports.php");
do_footer();
}
else
{
header("location:?id=2");
}
break;
case 2 :
echo "You are not authorized.";

View Replies !
Validating Time On Expired Login
I have decided to use shell script (cron job) on my server to check passwords. This was pretty straight forward. Here's the objective

1. User purchases a course online.

2. After credit card is approved, a silent post is sent
to a php file on my server that captures user name,
generate password, and insert CourseDate in
DateTime data type format. This works fine.

Problem:

We will have scheduled class dates twice a month. Some users
will register early, some will register right before the class starts.
I am experiencing a problem with setting the appropriate if then statements to verify expired passwords.

The MySQL database contains a FirstName, LastName, Password, CourseDate (DateTime Format), and a TimeStamp field.

When the cron file runs in the morning, I need the script to verify any passwords that are 24 hours older than the CourseDate. I have encounter problems because users pay for the course at different times. If I set a conditional to compare the TimeStamp with the CourseDate, the script will delete passwords before they are used. (earlier registration users).

View Replies !
Open A Specified Webpage If A Session Is Expired?
I have a question regarding to the new session management feature from PHP4. I have put this function on top of each php file. session_start();

if a session expired, the internet browser(eg. IE) have a screen telling the user to exit or 'refresh' the screen. is there anyway I can re-direct the browser and open a specified webpage if a session is expired? is it something related to the .htaccess file?

View Replies !
How Can I Avoid A Page Expired Error?
The user searches and see the results, then clicks for more detail in a
result. He then clicks the BACK button in the browser to see the results
again and....gets a page expired error.

View Replies !
Disable Backbutton - When Page Has Expired...
I have this on the page:
<?php
header("Pragma: no-cache");
header("Expires: -1");
?>

but I want it so, that when the user goes back, (s)he might not be
allowed too - say the session has expired.

How can i achive that?


View Replies !
Back Button Gives An Expired Warning
When I click the back button on a page generated by php, to go back to a listing page generated by php, I get this:

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.

View Replies !
Trying To Alter A Table Value Once Its Corresponding Date Has Expired
I've inherited a site that runs a simple jobs board script and am completely stuck.

When the $job_date_end field has passed then the job as expected, ceases to be live on the site. In the back-end admin section there's also an option to suspend a job. What I want to do is add a line of code that reads whether the $job_end_date has passed, and if so, suspends it $job_status=1 Code:

View Replies !
The Session_cache_limiter Function Page Has Expired
I have various forms which are submitted using POST - which I do on forms which will result in a database update. The problem is that when people use the back button to get back to a page which resulted from a POSTed form they get the above standard IE warning message.

I've played around with the session_cache_limiter function but don't seem to get what I want. I don't want the browser to cache results. i.e. if the update being made is to delete an item from a list, then I don't want them to press the back button only to see the item is still there from the cache.

View Replies !
Session Has Expired , How To Solve This Problem.
i have a web page on which i put some radio buttons and when i click it, its value is displayed in textbox.when i click 2 radio,the 2 values will be addded and displayed in textbox[like shopping cart]. next if i click submit button it print's those values in second page and i want to take some user input on second page and then all the data will be stored in db.

i did all this using sessions.it's working but when iam in second page,and when i click the browsers back button,to go to the radio buttons page and select some other options it is showing session has expired.how to solve this problem.

View Replies !
Button Back And Session Expired
I've all my site in PHP with POST method, for avoiding most user see what's appening in the variables I pass trough the pages. (as some info shouldn't be visible for most users). What appens when I push the "return" button is an error message telling the
"page has expired". I know this is a problem with the POST method, as I've seen thousand thread about this, but I can't change my code. So it's there any way to let this message disappear, maybe working with the header of the pages.

View Replies !
Page Expired, Please Refreh Note
when use back button, sometimes we get the "page expired, please refresh" note. Is there a way to avoid this note? Add a refresh javascript to this page to make it refresh every time will avoid this note, right? But it creates unnecessary refresh in the case we didn't back button to this page, it still refresh.

View Replies !
Annoying Popup Licence Expired
My trial period for Zend studio has just ended, I've requested a personal licence, and got it. After I've entered and rebooted by computer I still get a popup saying "Licence expired" everytime I request a php-page from localhost. If googled on on licence expired zend studion personal edition. But that gave me mostely Russian Crack sites. Very tempting 8-).

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 !
Session Expired -> Redirect User To Another Page.
I am using the new session management function from PHP4. session_start()
how do u redirect a user to another page if his session is expired? here is what i want to do:

1. user Tom enter his correct username and password.
2. my system use session_register() function register a variable in his cookie.
3. user Tom clicked Logout
4. my system use session_destory() function and redirect Tom to the login page.
5. Now, Tom click the 'BACK' button of his browser, a page showed 'page expired, hit reload button ... ...'.

here is my question, how do I redirect Tom to the login page if he clicked the BACK button?

View Replies !
Script To Access Expired/deleted Domains?
Does anyone know if there is a script available to access expired/deleted domains? If not, does anyone know how do you get access to the daily expired/deleted domains database?

View Replies !
Page Has Expired, BACK-button -problem
I have Windows XP&IE6.0.2... (SP1).

I'm coding one project with PHP.
I get "Warning: Page has Expired" when I try to get back to the "POSTed
page" (page whither moved from FORM-page).

Better explanation:
- Pages are:
* Page A: Front-page
* Page B: Page where is www-FORM

#1.) From Page "A" I move to the page "B" by clicking link on page "A" and I
fill the form's fields
#2.) Then I click SUBMIT-button and I moved back to the page "A"
#3.) I move to the page "B" by clicking link on page "A"
#4.) I click "BACK"-button from browser
#5.) I got "Warning: Page has Expired"

I want that when I click BACK, I will be moved to the page "A" straightly
without warning
(of course then post-data can't get re-sent)

Got any idea how in PHP I can prevent this warning?

View Replies !
If Session Expired Redirect Them To Login Page
when ever a user login, his information(name,login-time..etc) will be stored in sessions and also stored in users table. the table has following fields Code:

View Replies !
Posting Form Curl :: Your Session Has Expired
here below is the script that i wrote to pass information of the form to the URL. But the problem is that, the return page is showing me " Your session has expired". So please suggest some solution to this:

<?php


$post_data = array();
$post_data['firstname'] = "abc";
$post_data['lastname'] = "deg";
$post_data['snumb'] = "adafd";
$post_data['anumb2'] = "adfa";
$post_data['city'] = "Newyork";
$post_data['state'] = "Newyork";
$post_data['zip'] = "43234223";
$post_data['country'] = "USA";
$post_data['phone'] = "4134134143";
$post_data['email'] = "abc@abc.com";
$post_data['userid'] = "";
$post_data['password'] = "";
$post_data['submit'] = "Continue";
$post_data['amount'] = "5";
$post_data['recurring'] = "off";
$post_data['s_recurring'] = "";
$post_data['designategift2'] = "society upliftment";
$post_data['ShareBox'] = "GiveNameEmail";
$post_data['Option'] = "";
$post_data['submit1'] = "Donate Now";
$post_data['onBehalf_Name'] = "";
$post_data['onBehalf_email'] = "";
$post_data['Matching_Company'] = "";
$post_data['Matching_Email'] = "";
$post_data['cardType'] = "Visa";
$post_data['cardNum'] = "232325433453435343";
$post_data['cardExpMo'] = "08";
$post_data['cardExpYr'] = "10";

$url = "http://www.nycharities.org/donate/processtransaction_new.asp";

$o="";
foreach ($post_data as $k=>$v)
{
$o.= "$k=".utf8_encode($v)."&";
}
$post_data=substr($o,0,-1);

$ch = curl_init();
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
$result = curl_exec($ch);
echo $result;

?>

I know the pages , which are at present passing the information to this page. So, is it possible to get the session id from there?


View Replies !
Expired Article - Comparing Today To Expire Date
On my front page I have a list of articles that are pulled from my database. I have just added a column (expires) to the db in order to remove outdated articles.

I'd like to compare today's date to the expires date in my WHERE statement to exlude all articles where the expires date is older than today. But I'm at a loss right now on getting it to work.

View Replies !
Image Upload File Limit - Page Expired
just a slight problem with my upload. If the file size is above 50k i display an error message but when i go back with the browser the page is expired how can i work around this please. code is as follows:-

<?php

if(!is_dir($store_dir) )
{
echo("Specified directory is not valid... Exiting");
@unlink($HTTP_POST_FILES['upfile']['tmp_name']);
exit();
}
if( copy($HTTP_POST_FILES['upfile']['tmp_name'],$store_dir.$test3) )
{
echo("");
}
else

View Replies !
Log Out - Page Expired Not Working Or Pressing Browser Back Button
I am a problem with I logout from my site. When I push log out link I send it to a new page with this script in this:

<?php
session_start();
session_unregister($SESSION);
session_destroy();
unset($SESSION);?>

In each page I have this other script
#accesscontrol.php
<?
session_start();
if (session_is_registered("SESSION")!= FALSE ) # ya la sesion existe entonces la cargo
{ #Maybe I use after. } else
{echo "<h1>Sorry...</h1>";
echo "<A href = "index.php"><H4> Login Univernet</H4> </A>";
session_destroy();
exit;}?>

The problem is when I log out and press the back button I am back to the pages. Sometimes it tells me that page expired but if I reload the page everything is ok and all my "security" pages are available.

View Replies !
Avioding Expired Pages, & Carrying Data Accross Multiple Form Pages
I have a checkout/order form that consists of 6 pages, all PHP. The are linked to one another, like, after the user finishes page 1, they proceed to page 2, etc... The first two pages are submitted by a GET link, so those are not in my question. The next 4 are submitted using a <form>. Throughout all of the pages, i would probably have about 25-30 variables, things that the user has to fill out. I have two questions,

1. What would be the best way for me to keep track of all the data moving throughout the pages, like storing it from page 4, and i still need to access it on page 6.
2. I don't know if anyone could help me here, but does anyone know of a way to code around those ugly "page expired" pages, because of a submitted form. If a user needs to go back, which most likely they will, is there some sort of way for me to skip the expired page?

View Replies !
"Warning: Page Has Expired" - How To Aviod When Using Browser Back Button?
In summary:
I want to a form to submit information via a HTTP POST, however, when using
Internet Explorer I want to be able to use the back button and all the
information retained. Presently we get a "Page has expired" message. How can
we avoid this?

Full details:
Having searched for postings on how to avoid the "Page has Expired" they are
numerous, however, I have not found one that answers the question
adequately.

Hence this posting.

One posting directed me to the following webpage:
http://in.php.net/session_cache_limiter

but I played around with "session_cache_limiter()" and it did not give the
desired results. (It seem to make no difference). Also many people say to
use HTTP GET instead but this is not an option in this case.

Where can I find concise definitive information on how to avoid "Warning:
Page has Expired" and allow the user to press the back button and see the
form as it was before they submitted it?

View Replies !
Refresh Problem - Warning: Page Has Expired The Page You Requested Was Created Using Information
i got two php page at the movement, which they called edit2.php and edit3.php. when i submit a form from edit2.php to edit3.php, then i could not come back from edit3.php to edit2.php.

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. Code:

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 !
Go Back Without "page Has Expired" Warning
I have three pages: 1 2 3. Page 1 "posts" information to page 2, and page 2 uses "href=somePage.php?..." to send information to page 3. I would like to allow the user to be able to hit the back button to go  back to page 2 without getting the "page has expired" warning. I also want to stay away from "get" on page 1 if possible, and no javascript.

View Replies !
Why Do I NOT Get The "Page Has Expired" Warning?
Normally, when you submit a form to a page using the POST method, and you subsequently use the browser's back button to navigate back to that page, it comes up with the standard warning "Page has Expired... To resubmit the information click the refresh button". I understand why that happens - the page resulting from a POST submission becomes immediately stale.

BUT... on one of my sites this isn't happening and I can't understand why. I can click Back and the page displays just fine. I don't want that to happen as I want to generate a unique transaction ID each time that page is displayed.

The page is submitted via POST to PHP_SELF but I've tried submitting it to a different page and that makes no difference.

Has anyone come across this problem before? I've been scratching my head for hours.

View Replies !
Sql-queries Within Sql-queries
Is there any way to put an sql-query into another sql-query and get it parsed as an array?
I want to fetch an array from my db and the content should preferably hold another sql-query, is that possible?

View Replies !
Must I Use 2 Queries
Not having access to any mysql NG, I try to post here:

I've a query where I'd like to get the different values, but also a max for
2 fields:

SELECT max(CounterLogResult) as maxlog, max(CounterClick) as maxclick,
articleid, articlename...

but I get the errro:
Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is
illegal if there is no GROUP BY clause

I don't understand what I've to group....

View Replies !

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