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