Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 3 of 3
  1. #1
    Join Date
    May 2007
    Posts
    6

    How to embed PHP into Javascript?

    is it possible?

    Code:
       <SCRIPT LANGUAGE="Javascript">	
          document.location = "product.php?search=<?php echo $search;?>"
       </SCRIPT>

  2. #2
    Join Date
    Nov 2006
    Location
    Quebec, Canada.
    Posts
    432
    Mmmm... I think. Not sure, but I'd say... just try it !?!!

  3. #3
    Join Date
    Sep 2005
    Location
    Arizona
    Posts
    77
    Make sure to retrieve your $seach variable from your search field (?) prior to calling that function. Then you should be good to go...

    <?php
    $search = $_POST['searchfield'];
    ?>

    or

    <?php
    $search = $_GET['searchfield'];
    ?>
    Last edited by srussell; 11-13-2007 at 07:43 AM.

Similar Threads

  1. Example: Sending Email Using a Remote PHP Web Script
    By Corey in forum AutoPlay Media Studio 5.0 Examples
    Replies: 36
    Last Post: 06-10-2007, 02:07 PM
  2. Function: Email Any Data Through PHP
    By Brett in forum AutoPlay Media Studio 5.0 Examples
    Replies: 8
    Last Post: 10-02-2004, 08:08 PM
  3. The dreaded Submit to web PHP issue!
    By Bruce in forum AutoPlay Media Studio 4.0
    Replies: 2
    Last Post: 09-19-2003, 03:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts