Jump to content

onClick to PHP


sazzie

Recommended Posts

[quote author=dgiberson link=topic=123998.msg513241#msg513241 date=1169740943]
i take it your trying to call a function from test2.php?
[/quote]

Yes, I am trying to call a function in test2.php. At present I have got it to go in and execute some code.
I am now trying to pass some form element values without much success. The code is as follows :

[code] <input type="button" value="Add Course Information" onClick="parent.location='private/test2.php?start=document.form1.<?php print "start";?>'">
[/code]

The "parent.location= " aspect allows test2 to be called sucessfully.

document.form1.<?php print "start";?> is supposed to return an integer value but I get string.
Form1 is the name of my form and start is an input element name.

Believe me, I know it is easier to simply use the traditional get/post methods but I am required to do it this way.
It will take too long to explain.

Thanks for your help.
Link to comment
https://forums.phpfreaks.com/topic/35676-onclick-to-php/#findComment-169565
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.