javascript in php code

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
webatzman
Forum Newbie
Posts: 4
Joined: Thu Oct 03, 2002 4:45 pm
Location: mexico
Contact:

javascript in php code

Post by webatzman »

I have a sentence in php

$stmt = OCIParse($conn,"select * from kedo where claveedo = $i");

how i can to put javascript in

$stmt = OCIParse($conn,"select * from kedo where claveedo = $javascript_variable");

thanks ur help
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

welcome to this forum :D
  • please read the sticky threads first
  • Sticky: Before Post Read: Warning: Cannot add header information
  • Sticky: Before Post Read: Concerning Passing Variables in PHP 4.2+
  • Sticky: Before Post Read: Frames, JavaScript, and PHP Overview
the last one will (hopefully) answer your question
User avatar
cybaf
Forum Commoner
Posts: 89
Joined: Tue Oct 01, 2002 5:28 am
Location: Gothenburg Sweden

Post by cybaf »

you have to post the $javasctipt_variable to the php page from a form and then access the variable with $_POST['javascript_variable'] or $_GET['javascript_variable'] depending on what type of for you use.

//Anders Fredriksson
Post Reply