This is a discussion on "javascript in php" within the PHP Forum section. This forum, and the thread "javascript in php are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
javascript in php
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
javascript in php
hey what i am trying to do is basically if the user didnt get the right pasword, they are sent away to some other site, but for some reason, the javascript does not work inside the php thing... i tried the little javascript segment outside and it worked fine. am i missing something here? thanks
<?php if ($_POST["Psword"] != "MyPassword") { echo "<script type="text/javascript">window.location="http://www.google.com"</script>" } ?> |
|
|
|
||||
|
Re: javascript in php
Why dont you use:
|
|
||||
|
Re: javascript in php
Marc's first version is recommended - javascript can be turned off, PHP cannot.
__________________
Resources Administrator
Grilling Gurus - Interviews with the Best Web Designers and Developers in the Industry Got a Question for Ryan Carson and his Web Design/Development team Carsonified? Jack Franklin - My Blog (It's a Pen in My Mouth BTW)
Last Blog Entry: My Latest Project - Grilling Gurus... (Jun 11th, 2008)
|
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| php and javascript | yvettesio | JavaScript Forum | 8 | Mar 14th, 2007 23:18 |
| JavaScript | cbrams9 | JavaScript Forum | 1 | Sep 20th, 2006 17:35 |
| using xml in javascript | shailu | JavaScript Forum | 0 | Jul 25th, 2006 07:36 |
| Can someone help me with this javascript | Galaxyblue | JavaScript Forum | 2 | Mar 11th, 2004 12:18 |
| what does \\ mean in javascript | jenjen1018 | JavaScript Forum | 5 | Jan 6th, 2004 17:05 |