Redirecting to another page using PHP: how, why and best practices

Redirecting to another page using PHP: how, why and best practices

Dave Hollingworth

7 лет назад

96,262 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@shvideo1
@shvideo1 - 03.12.2023 01:16

Excellent video. Thank you. Can you please comment on how to send cookies to a different domain in a redirect? They don’t seem to work in JavaScript and I don’t know how to create and send a cookie on a form submit to page on a different domain. Thank you.

Ответить
@NimeshPatel-et2kn
@NimeshPatel-et2kn - 28.11.2022 18:55

You are lifesaver. couldn't figure out why redirect won't work. Finally, that was the exit command, which was missing. Thanks a million..

Ответить
@ihsanbacha6436
@ihsanbacha6436 - 24.09.2022 11:32

thank you

Ответить
@apanoiu
@apanoiu - 18.05.2022 07:59

Very useful information : before redirect should not output anything to the page.

Ответить
@micahemmanuel7580
@micahemmanuel7580 - 24.10.2021 17:02

Thanks.

My own issue is that when I login it will say login successful and hang there without redirecting me to the dashboard.

How can I fix this issue?

Ответить
@fastdevz8003
@fastdevz8003 - 13.04.2021 01:42

thanks very must it helped me in a different wait 👍

Ответить
@rlcbmusicph
@rlcbmusicph - 20.01.2021 10:34

Good morning sir. U can get 5subscription if u answer my questions perfectly.

I know php,mysqli, JavaScript,ajax

But dont know how to direct my pages from <a href"">
Like this in url..


Mainpage.php?secondpage

Or

Comment.php?id=44466

Or

main.php?accdo=setting

Ответить
@TutorIsland
@TutorIsland - 20.12.2020 18:19

Well done and the 'exit' tip really allowed me to understand why I was getting "php notice" and "php warning" from the php error log, after a header('location: ...
Didn't find this elsewhere, looked for it for hours!
Thank you, Sir - subscribed and liked!

Ответить
@unofficialmimolivetutorial8832
@unofficialmimolivetutorial8832 - 25.11.2020 04:10

Thx, I always did this wrong. Instead of exit I used die() and I never sent the correct status code... I have to see your other videos. You're amazing!

Ответить
@aguyoninternet9883
@aguyoninternet9883 - 06.09.2020 09:13

thenku sir

Ответить
@john-johnbanuelos4335
@john-johnbanuelos4335 - 19.07.2020 18:53

why is the code not working anymore?

Ответить
@boy123838
@boy123838 - 01.04.2020 07:39

Nice work

Ответить
@MarkGoldfain
@MarkGoldfain - 22.10.2019 08:55

Beautifully explained. Thanks for this tutorial!

Ответить
@chaoseagle4275
@chaoseagle4275 - 18.10.2019 23:18

Thanks for the info.

Ответить
@Sri_Hari_527
@Sri_Hari_527 - 11.09.2019 03:59

can you share vedio related ...like how to pop pup to next page by clicking ok button in php

Ответить
@Raj-pk4hp
@Raj-pk4hp - 14.11.2018 16:38

saved a fukin life dude ty

Ответить
@punitvachhani9676
@punitvachhani9676 - 01.09.2018 19:31

can you give me social media id so that i can talk to you

Ответить
@nepalcodetv6298
@nepalcodetv6298 - 21.05.2018 17:36

I want it to show a message before redirect how can I do it ??

Ответить
@purevegkhana
@purevegkhana - 17.09.2017 16:59

i have my files as .html , im not able to redirect them. when i click on a button nothing happens but i can see the page gettin loaded in network option .

Ответить