Click here to Skip to main content
15,887,344 members
Home / Discussions / Linux, Apache, MySQL, PHP
   

Linux, Apache, MySQL, PHP

 
QuestionHow to export to doc in php Pin
sarang_k20-Jul-10 0:48
sarang_k20-Jul-10 0:48 
AnswerRe: How to export to doc in php Pin
Peace ON20-Jul-10 1:11
Peace ON20-Jul-10 1:11 
GeneralRe: How to export to doc in php Pin
sarang_k20-Jul-10 1:38
sarang_k20-Jul-10 1:38 
GeneralRe: How to export to doc in php Pin
Jayapal Chandran26-Jul-10 8:29
Jayapal Chandran26-Jul-10 8:29 
QuestionPHP/SQL -> Duplicate data on Insert when Page is refreshed Pin
lgmanuel19-Jul-10 22:53
lgmanuel19-Jul-10 22:53 
AnswerRe: PHP/SQL -> Duplicate data on Insert when Page is refreshed Pin
Peace ON20-Jul-10 0:01
Peace ON20-Jul-10 0:01 
AnswerRe: PHP/SQL -> Duplicate data on Insert when Page is refreshed Pin
cjoki20-Jul-10 4:53
cjoki20-Jul-10 4:53 
AnswerRe: PHP/SQL -> Duplicate data on Insert when Page is refreshed Pin
Jayapal Chandran26-Jul-10 8:23
Jayapal Chandran26-Jul-10 8:23 
I assume you are using an ajax framework which uses iframe to submit your form. In that case you are doing a normal refresh like you press F5. Or if you say that you are using javascript to reload the page like window.location.reload() then you will face that problem whether you are using F5 or reload using javascript. whatever. use window.location.href = window.location.href. this is like assigning a string to as the new url instead of meaning to the browser as reload. so the browser will load the page as a new request instead of page refresh. so we are reassigning a new(same) url (requesting the browser to load that page) instead of requesting the browser to reload the page. so the only difference here is loading a page and reloading a page.

To load a page use window.location.href = window.location.href (new request)
To reload a page use window.location.reload(). (refresh the same)

I suppose that your problem lies within this.

If you are not using ajax then use the redirect option in php to the same controller(page) to change the last loaded url. for example if you are posting your form data to a page called post.php in that after processing the database operation redirect to again the same post.php. by doing so you are changing the last request as a get request. and after that when you refresh the browser will issue a get request and not the previous post request because it will do a reload only with the last request.

DO YOU NEED A SAMPLE CODE?

IF THIS DID NOT SOLVE YOUR PROBLEM THEN USE
INSERT IGNORE INTO table (field1,field2) VALUES(1,2);

Better i should blog this answer with more possible combination.
Shucks | :-\
Today's Beautiful Moments are
Tomorrow's Beautiful Memories

Questionhow can i get boundaries of a region Pin
hariranjit17-Jul-10 20:19
hariranjit17-Jul-10 20:19 
AnswerRe: how can i get boundaries of a region Pin
Peace ON18-Jul-10 23:11
Peace ON18-Jul-10 23:11 
AnswerRe: how can i get boundaries of a region Pin
Jayapal Chandran26-Jul-10 8:35
Jayapal Chandran26-Jul-10 8:35 
AnswerRe: family Tree Script Pin
User 171649217-Jul-10 2:38
professionalUser 171649217-Jul-10 2:38 
GeneralRe: family Tree Script Pin
Noman Rasheed17-Jul-10 2:55
Noman Rasheed17-Jul-10 2:55 
GeneralRe: family Tree Script Pin
User 171649217-Jul-10 3:12
professionalUser 171649217-Jul-10 3:12 
GeneralRe: family Tree Script Pin
Noman Rasheed17-Jul-10 3:18
Noman Rasheed17-Jul-10 3:18 
GeneralRe: family Tree Script Pin
User 171649217-Jul-10 10:13
professionalUser 171649217-Jul-10 10:13 
GeneralRe: family Tree Script Pin
Noman Rasheed17-Jul-10 10:33
Noman Rasheed17-Jul-10 10:33 
GeneralRe: family Tree Script Pin
Noman Rasheed18-Jul-10 9:54
Noman Rasheed18-Jul-10 9:54 
GeneralRe: family Tree Script Pin
User 171649218-Jul-10 11:54
professionalUser 171649218-Jul-10 11:54 
QuestionPHP Mail from Script on Linux Pin
NDBUK16-Jul-10 9:38
NDBUK16-Jul-10 9:38 
AnswerRe: PHP Mail from Script on Linux Pin
cjoki19-Jul-10 4:26
cjoki19-Jul-10 4:26 
Questionregular expressions performance Pin
yftah198913-Jul-10 22:20
yftah198913-Jul-10 22:20 
AnswerRe: regular expressions performance Pin
Richard MacCutchan14-Jul-10 1:20
mveRichard MacCutchan14-Jul-10 1:20 
AnswerRe: regular expressions performance Pin
CitrusTech14-Jul-10 1:56
CitrusTech14-Jul-10 1:56 
QuestionRegular expressions performance Pin
yftah198913-Jul-10 22:19
yftah198913-Jul-10 22:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.