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.





Reloading Page By Pressing Enter


I have always used a standard method to get my PHP sites to work and I am finding solving this one a bit of a mind bender. I would appreciate some help. It sounds simple but I am not getting any success.

I need to get a page to reload repeatedly on pressing enter. There is no user input form and the user will exit by clicking a link.

The page is a flash card type operation for a non-comercial site teaching people how to speak an endangered language. (It is has 20,000 people studying it a year according to the available statistics.) The idea is that the page creates a randomish but gramatically correct sentence which the user then repeats to themselves before pressing enter to get the next sentence.




View Complete Forum Thread with Replies
Sponsored Links:

Related Messages:
Pressing "SUBMIT" VS Pressing ENTER
I have a little weired problem .

A PHP function attached to a form produces wrong resutls when i perss ENTER insread of pressing the SUBMIT button by mouse ? How can that be solved ?

View Replies !   View Related
Problem With Pressing Enter On One-textfield Form
I have a mail form, where I would like the users to enter a secret code and
check one checkbox before the form are processed and the values can mailed.
Otherwise stop and display an error. But it won't work. What's wrong with my
nice newbie-code? Here it is:

The form:
<div>
<form method="post" action="process.php">
<p>Name:</p>
<input name="name" type="text" />
<p>Email:</p>
<input name="email" type="text" />
<p>Subject:</p>
<input name="subject" type="text" />
<p>Message:</p>
<textarea name="message" rows="6"></textarea>
<p>Enter secret send-code:</p>
<input name="secret_code" type="text" />
<p>Agree to terms?:</p>
Yes <input name="check[]" type="checkbox" value="yes" />
No <input name="check[]" type="checkbox" value="no" />
<br />
<input type="submit" name="submit" value="Send" /><input type="hidden"
name="do" value="send" /><input type="reset" name="reset" value="Reset" />
</form>
</div>

Here is process.php:

<?php

View Replies !   View Related
Pressing The Submit Button Will Returned To The Index.php Page.
I am trying to build a cms , i am a beginner in php. I have a little chatbox ( i use include() in the index.php file ) and I need something llike this : after someone is pressing the submit button it will be returned to the index.php page.

View Replies !   View Related
Reloading The Same (or Different) Page?
How do I get PHP to reload the current page, or redirect to another page automatically?

View Replies !   View Related
PHP Page Reloading On Mac IE.
I have a site that I've built using PHP and my client has a Mac and uses IE. When you pull up any page of the site on Mac IE, it loads the page, then reloads the page once. I've used an include for the navigation on each page. Not sure if that has anything to do with it. Has anyone had this happen or have any ideas I might try to eliminate the reloading?

View Replies !   View Related
Page Keep Reloading
I am writing program using PHP 5.0.3, MySQL 4.1.8 and Apache 2.0.52, running in Windows XP. When I install my program + the above PHP/MySQL/Apache in other computers, they only run well in certain computers.

The problem that occurs is that I cannot view all PHP pages properly. When I view some affected pages, the browser keeps reloading and reloading until it displays "Page cannot be displayed". Sometimes it doesn't reload but go to "Page cannot be displayed" straight away.

View Replies !   View Related
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 !   View Related
Page Reloading Problem
Here's my problem. I'm having trouble managing the additional variables
on the end of my URL. For example, I might have a URL like the following:

http://www.mydomain.com/index.php&option1=5&option2=7

It's the 'option' variables I'm having problems with. I would typically use
variables of this form to control various aspects of the current page.
However, the actual options present will be dependant on the current mode of
the page. Now lets say that I want to put a link on my page that adds a new
'option3' variable and reloads the page. The php might look like:

echo '<A HREF="'.$_SERVER['PHP_SELF'].'?'.SID.'&option1=5&option2=7&option3=6'."">ne
w link with new option</A>";

But I can't really use this because this page might not actually contain
option1 and option2 - it may have option5 and option6 instead. What I want
to be able to do is to leave the current options alone and just add the ones
I want to add. What is the best way of doing this?.

I reckon the best way to handle it would be to have a $_SERVER variable that
would give me the full current URL including all of the options. That way I
could a line similar to:

echo '<A HREF="'.$_SERVER['FULL_URL'].'?'.SID.'&option3=5'."">new link with
new option</A>";

and it would just work. Is there such a variable?, or is there a better way
of doing this?

View Replies !   View Related
Reloading A Page In IF Statement / PHP
if ( $turns == 0 ) {}

if i wana reload a page if this statement if true, with out the user havign to click any thing how can this be done?

i tried

if ( $turns == 0 ) {
header('Location: main.php');
die(); }

it doesn;t seem to be working]

View Replies !   View Related
Stop Someone Reloading A Page
is there a way in either php or html to disable the back and or the reload/refresh on a browser so a potential spammer cant just keep refreshing the page of a form that sends a confirmation email out .

View Replies !   View Related
Stopping People From Reloading A Page
I have a form, and when submitted it inserts a new row into a database. If people reload the target page, I'm sure that it'll reinsert another duplicate row. How do I stop people from submitting info numerous times?

View Replies !   View Related
Reloading The Page After Submitting To Database
I have a form that is collecting Information for a newsletter. In the same page I have the results of the newsletter.

What is happening is that after I submit the page to the database with the forms the page is not updating and when I do click reload in the browser it just places duplicate copies in to the Database. Code:

View Replies !   View Related
Access Database Without Reloading Page
I need a way to dynamically access the MySQL database to see what users may be online, or if the member has any new private messages without reloading the page or redirecting. This script would execute every 5 or 10 seconds.

View Replies !   View Related
Header Function And Reloading Of Page
i don't understand about the header function. I have a script that downloads files from my server. How i have it now is that the file name is a link to the same page with a variable appended telling it to download the file.

when i click the link the file does download but the page doesn't reload and the attached variables aren't in the URL. the reason i want the page to reload is that everytime the file is downloaded it updates my mysql database telling it how many times it has been downloaded, and i want the new value to be displayed. Code:

View Replies !   View Related
Changing Pictures On Index-page When Reloading
I am a beginner but quite curious anyway.

My problem: I have seen websites that show different pictures whenever you enter the site. By doing this, the sites look always fresh and attractive and I like the idea a lot. Now I like to have the same function on my site but I do not know how that works...

Is there anybody who can give a good "explanation for dummies" on how to do that?

View Replies !   View Related
Very Strange ... Reloading Doesn't Get Current Version Of Page
Very frustrated by a quirk in a normal html form submission (a search box).

First it was getting no $_POST vars, though I checked the form method,
and used print_r($_POST) to see. Eventually I realized that when I
refreshed the browser it would not really refresh.

For example I put in a phpinfo() call just to make sure I was editing
the right search.php -- I refreshed and got the good old phpinfo. then I
commented that line out. I refreshed and got the good old phpinfo
anyway. I deleted the line entirely and still get it.

So it's getting a cached version from somewhere... I can't imagine
where; I've been building sites on this box for over a year and this is
the first time I've seen anything like this.

View Replies !   View Related
Reloading The Page Where The Popup Window Was Executed
I`m having touble with reloading the page where the popup window was executed. When I`m clicking on yes the page behind is supposed to relaoad, but it dosen`t why? code:

View Replies !   View Related
Reloading Page From PHP Script Included With Javascript
I have a page with a div which is filled with content from a PHP
script via javascript and innerhtml. Sometimes, depending on the results of the PHP script, I want to to reload the entire page, not just the div . However if I put a PHP redirect in the script, it just loads the entire page into the div.....

View Replies !   View Related
Reloading The Page With Updated Query String Values
I'm trying to build a small portfolio and instead of using several HTML pages I wanted to just use PHP. What I have is an array of each image's path (for the "src" attribute). I was thinking when I click "Next" (a text link) it increments the array and once it has reloaded itself it would simply look at the query string then display the new image. I have some questions though:

1. What line do I use which will reload the page with the new incremented variables?

2. When the page reloads itself, will it automatically get the new image to load? I already placed $thisimage = $_GET['imagenumber'] at the very top so it updates the "src" attribute for the image.

View Replies !   View Related
Enter Text From Html Page In Php Form
I'm trying to do. What I have: listing.html:

<a href="apply.php">Click here to apply</a> Please mention job ID ###.

apply.php then has a form where the applicant can enter their contact info and the position they are interested in (text).

Can I use php to read the job ID which follows each apply link on listing.html, and then automatically enter it in the Position field on apply.php?

View Replies !   View Related
Make A Page Where My Users Can Enter A Person's Name
I am trying to make a page where my users can enter a person's name then, otpionally, upload a picture of them. And then write it all to the database and "deal" with the picture.

I allready have the working code for entering a name and storing it in my MySQL database, but I don't have a clue as how to deal with the "optional" picture upload and subsequent "dealing" with that file.

I would appreciate any sample code to upload the picture and storeing the reference along with the name that was entered.

View Replies !   View Related
Enter A New ROW After 3rd Image For 5 Rows And Then New Page For Remaining Results
I want to show 3 images per row and show 5 rows per page, that would be 3 images X 5 rows = 15 images. per page and then press next to go to next page to see if there are more images for that user. This is a script for making two users friends of each other. Code:

View Replies !   View Related
Automatic Submit Without Pressing GO
When you click a drop down box to display, then select the option from the drop down box after that, how do you make it submit automatically without pressing "go" or "submit" button? Can I do that in PHP?

View Replies !   View Related
Submit Form By Pressing Any Key.
I would like to create a hidden form which shold be submitted after
user press any key. Is it possible?

View Replies !   View Related
Pressing Submit Refreshes
Last night i coded a silly little login script for practice. I'm not the world's best programmer, and I've not used php in over a year, I've been using pascal and C++. Can anyone see why, when I push submit, the script just refreshes rather than submitting the data to MySQL? PHP Code:

<html>
<head><title>Register</title></head>
<body>
<?php
$self = $_SERVER['PHP_SELF'];;
$username = $_POST['username'];
$password = $_POST['password'];

if( ( $username == NULL ) or ( $password == NULL ) ) {
        $form ="Please enter all new user details...";
        $form.="<form action="$self"";
        $form.="method="post">Username: ";
        $form.="<input type="text" name="username"";
        $form.=" value="$username"><br>Password: ";
......................

View Replies !   View Related
Pressing "SUBMIT
I have a search form that includes a number of drop-down menues and a text field. The search works correctly only when i press the SUBMIT  button by mouse. When i press ENTER after filling the text field, it doesn't send correct values. The search returns all results without the condtion as if it empties the text field before sending.

View Replies !   View Related
Stop User From Pressing Refresh ?
i have a form that posts to a text file. how do i stop or do not post that data to the text file multiple times ? if user press refresh 10 times, the same data will be posted 10 times to the text file ?

$tmpfile = fopen("info.txt", 'a');
flock ($tmpfile,2);
fwrite($tmpfile, "
$refer1|$email1||$name1|$user1|$pass1|$today" );
fclose($tmpfile);

View Replies !   View Related
Pressing Submit Refreshes My Login
I've made a log in script but when I press submit...The script just appears to refresh. Code:

View Replies !   View Related
FORM MEMORY ON PRESSING BACK BUTTON
Do most browsers retain form fillup memory of previous page ? That is
when the user presses back button, the forms on the previous page come
up filled.

View Replies !   View Related
Populating The Drop Down And Pressing The Submit Button
1. The first is I have two drop down menus. The first is "year" and the second is "mfr". When a user selects a year from the drop down it then populates the second drop down, mfr, from the MySQL database. Theat is working fine. But the problem I am having is the "submit" button (which I have labeled as "browse"). When I click it. Nothing happens, no action tacks place. I have looked over the code and I can't figure it out. (See Code Box 1 Below).

2. Right now the "mfr" drop down is populated by the MySQL database and reads with a list like "Acr", "Alp", etc. These are abreviations. I need to set up an array to have them instead read the entire mfr name. Example: Instead of "Acr" it needs to be "Acura". Instead of "Alp" it needs to be "Alpine". I need these full names to appear in the drop down. I know I need to do something like this (See Code Box 2 Below) but I can't get my finger on it. Code:

View Replies !   View Related
Is It Possible To Execute A MSSQL Query By Pressing A 'Submit' Button?
Currently I have a page which allows me to add users to an event. I have a drop down menu with the users, and my goal is to be able to add users to a table, so when I want to display the event, I can also see the users who are to attend.

As it stands now, I have it coded, albeit incorrectly. I can submit users, I can display them with the event correctly, but I am having a couple issues.

1) Anytime I hit F5, a blank record is added to the table.

2) I cannot for the life of me figure out how to delete a user from the list! I understand it in theory, bgut I cannot figure out how to tie a sqlquery DELETE to an HTML link which when pressed will execute the query.

So, is it possible to tie a sql INSERT query into an HTML 'Submit' button? Is it possible to tie a sql DELETE query to an HTML link?

View Replies !   View Related
Send Email - Page Where You Enter An Email Address And Click Send.
I am interested in creating an "email -this" type ability for a website. I am sure most people have seen an "email -this story" type link that is standard on most news web sites. You click such a link and then it takes you to a page where you enter an email address and click send. The link for the story and the title are not editable. Does anyone know where I can find example code of how to do this with php, and any explanation of how this works.

View Replies !   View Related
Reloading
I coded a page which I want to be reloaded periodically. I used the following line in the header:

<meta http-equiv="refresh" content="60; URL=http://....../">It all works. The problem is, that the page contains a form that is being filled by the user. I want to pause (or stop) the reloading while the form is being filled, in order to avoid the page to reload while the form has not been sent out.
Is there any possibility to do so without using Javascripts? This is not an option, because some users may have Java execution deisabled.

View Replies !   View Related
Pressing Browser Back Button - Form Filled Data Disappeared
When filling out a web form on a php page that is submitted to a search
which lists the results based on the criteria provided (in the form), all
works fine and as expected.

However, when I press the back button to amend the form all of the search
criteria data has gone and I have to fill it all out again if I want to do a
similar search which is frustrating. (This does not actually happen in
Firefox browser but most of my users will be using IE). How can I prevent
this from happening?

Previously I made a post about avoiding "Page has expired" and the
conclusion I came to for that was not to use a "POST" which did the trick.
But now I want to retain the data I input?

View Replies !   View Related
Reload Isn't Reloading
Still getting the same issue i submitted a couple of days ago. I can use
PuTTY to edit files in-place, on production server, and when I refresh
the page the changes won't have any effect.

I have made sure the templates_c (smarty) is 777; httpd runs as "nobody"
so i made chgrp'd the whole htdocs directory to "nobody". i even
reinstalled Apache/MySQL/PHP. where should I start looking?

View Replies !   View Related
Reloading A Php File
I have a website that is built on php/mysql. My members can send and get email and instant messages. The problem is for the member to get an alert that they have a "new message" the page must be reloaded. Obviously this is a bandwidth kill, plus if the user dosen't pay attention or view any other pages they will never get an alert. Does anyone know of a way I can do this in php without reloading the whole page? In an iframe maybe?

View Replies !   View Related
Reloading A Form
I want to have a pop-up open that a user can upload a file and then once the file is uploaded the pop-up closes and reloads the form to show the file that was upload. much to say i wish to attempt what vbulletin does when you attach a file.

View Replies !   View Related
Reloading Is A Drawback
Web development is rolling with AJAX. I too have read about the features of the AJAX. AJAX article writer says , ajax does not require page reload. They consider it (page reload) as a drawback. I am not able to understand, why page reload is being consider as a drawback.

View Replies !   View Related
Redirect Just Reloading Itself
I want to redirect from an HTML file to a PHP script (to conserve a past link published elsewhere).

(file oldfile.html)
<html>
<head>
<meta http-equiv=refresh
content="3; project.php">
<title>HTML redirection</title>
</head>

<body>
<h1>HTML redirection</h1>
<p align="center">
Please wait while you are redirected to the new site
or click <a href="project.php">here</a>
</p>
...

View Replies !   View Related
Update Without Reloading Browser
Obviously I'm new to PHP. I would like to be able to update a table in a
page from a database on the server without reloading the page each time. Is
this possible with PHP?

View Replies !   View Related
Setcookie And Reloading Pages
Wondering why my setcookies didn't have any impact, I noticed the line in
the manual that said the page needs to be reloaded before they take effect
(which does make a certain kind of sense). So, how do I force a page to
reload?

View Replies !   View Related
Script Reloading Issue
I have a PHP framework that integrates buffering and sessions among
other things and I'm having a problem where my script will get reloaded
2 or 3 times before being output to the browser. I haven't found any
other references to this sort of problem so I thought I'd try here.

I do most my development on a Windows XP Pro desktop (running XAMPP),
so I thought maybe it was an XP-specific problem, but I just tried it
on my linux host and same thing. Here's a little log that helps
illustrate:

Session|Script Basename Datetime Split Time
-----------------------------------------------------------------------------------------
001|01 test.php [2006 Jun 13 06:27:00] +-----+ ms
002|01 test.php [2006 Jun 13 06:27:01] +348.15 ms
003|01 test.php [2006 Jun 13 06:27:01] +265.15 ms

That's loading the page in Firefox once. Counters in the left column
are a session and static variable respectively. Other scripts will
load twice. It's especially problematic where there's something like a
email trigger involved as it will send off multiple emails where only 1
is wanted.

Anyone else encounter anything like this? Could it be a Session or
buffering problem? Something to do with logging perhaps? And why 2 or
3 times and not 7 or 8 or 1000?

View Replies !   View Related
Server-side Form Value Reloading
My site has a complex form that passes it's values on to a validation script using the POST method.  If validation fails, the validation script displays an error message to the user and presents a 'go back' button that takes him back to the form.  I'd like to reload the values into the form fields when the form page reloads, and I want to keep it all on the server side if possible.  Here's how my form looks (excerpt): Code:

View Replies !   View Related
Can Update A File Without Reloading/refreshing It?
Can PHP update a file without reloading/refreshing it?

View Replies !   View Related
Reloading Data Files Into A Database
I still have not got my site up and running with php/mysql yet, as we are simply waiting for the data to be "copied and pasted" into excel so we can load it to the database....but we're close.

Anyway, my question is regarding reloading data files into the database. for example, after I create the database for the FIRST TIME, i will load the data into the DB by using the following command (an example): Code:

View Replies !   View Related
Image To Change Without Reloading The Website
I was wondering how to make an image to change without reloading the website; for example, when a user clicks a link on my frameset, i want my inframe to switch site (easy) and sametime change the image of a image inside the code (hard).

View Replies !   View Related
Reloading Pages Using Ajax Automatically After A Set Time
i have a page and i want to load an html page into the a <div>, i found a script to do that, however i am looking for a script that allows me to load html into a <div> in my page and reload it after every 30 seconds automatically.

Just to reload reload the page every 30 seconds in the ajax way...

View Replies !   View Related
Session Problem - Login Screen Continually Reloads After Pressing The Login Button
I am trying to get sessions to work on a log in screen to give certain
users access to certain pages/directories. The problem is that when
the login button is pushed (or the enter key pressed) the login screen
redraws, never loading the next page. I don't get any error messages.
I am using FreeBSD-5.1/Apache-2.0.46/MySQL-4.1.0.1/PHP-4.4.3.4

I have pasted the code below:

View Replies !   View Related
How To Enter A Value
echo "enter a value to continue..."

after this echo the script should prompt and wait for a value followed by enter.

If the visitor enter the value then I execute the next php code . Code:

View Replies !   View Related
Having To Enter <br>
I couldn't find anything about this, I know I suck at searching so if you know a place where I can find the answer, great. The question: I created a "news system" for someone, but ofcourse you have to add <br> to the end of all sentences to tell the html a new sentence starts. How do I tell my script to automatically add a <br> whenever someone ends a line in a text area or skips a line in a text area.

View Replies !   View Related
Enter Key
A simple form, one text field that submits to $PHP_SELF works fine when the submit key is clicked, but does not work when the enter key is hit. I'm using the following form:

<form action="<? $PHP_SELF ?>" method="post">
<input name="name" size="30">
<input type="submit" name="submit" value="submit">
</form>

script is invoked with

if($submit){
then do stuff
}

View Replies !   View Related
How Do You Enter The Date The Right Way Around Please?
When I enter the date into an HTML form and submit it to the MySQL database, I have to enter it in the formate yyyy-mm-dd, ie 2001-10-31.

I would like to be able to enter it the English way, ie dd-mm-yyyy, or 31-10-01.

View Replies !   View Related

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