RSS Forums RSS
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 2888 | Replies: 1 | Thread Tools  Display Modes
Reply
Join Date: Nov 2005
Location: Mty
Posts: 2
Reputation: Zill is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Zill Zill is offline Offline
Newbie Poster

JS Confirm in PHP

  #1  
Nov 30th, 2005
Hi, i have a php script form, and i want to use the js confirmation alert, the problem is, this

echo "<script>
var yes=confirm('warever you want');
if (yes){}<---here i want to plase something in php code
else{}
</script>";

$confirm='yes'
how can i math bouth codes?
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Aug 2005
Location: Oklahoma
Posts: 902
Reputation: chrisbliss18 is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 23
chrisbliss18's Avatar
chrisbliss18 chrisbliss18 is offline Offline
Posting Shark

Re: JS Confirm in PHP

  #2  
Nov 30th, 2005
JavaScript is a client-side technology and PHP is a server-side technology. This means that the JavaScript code executes on the browser and the PHP code executes on the server. You cannot have server-side code execute based upon the logic executed by the client-side code, at least, not directly.

It would seem that you are wanting to do a check for the functionality of JavaScript. Is this correct? If so, there are many ways to do this, but none of them involve PHP.
Did we help you? Did we miss the point entirely? Update your thread and let us know.
Don't like the answers you are getting?
Did you try searching?
Clean up and optimize Windows 2000/XP
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.



Similar Threads
Other Threads in the PHP Forum
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 4:37 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC