what happens to posted data

Status
Not open for further replies.

Pena

New Member
i have decided to scrap trying to print reports from fabrik directly, so i have made a new php file so that i can format it to look more like a student report than a website.

the first page is fabrik, but the jump page is my php.
so now i need to get the posted data and as a variable.

i have already set the php file up so that it will filter both databases at the same time based on the student number.

but right now for testing purposes, i have hard coded the variable

$useris = '123456';

now i want to get the submitted form data (just a text field "enter student number").

i have seen the following, but i obviously dont understand the syntax....


global $_SESSION;
return $_SESSION ['fabrik'][11]['student_no_']['value'];

i have tried the following
$useris = $_SESSION ['fabrik'][11]['student_no_']['value'];

and a bunch of various combinations....

do i need to insert anything into the php eval box in the form? or what?

i wish i had a better knowledge of php....

so basically, i want to turn the input value of the element "student_no_" into "$useris" on the jump page (my custom php file)

any help on that line of code would be GREAT, i have been searching and i cant figure it out..... mind you, i have been here at work for 10 hours now... :(
 
Is the PHP file totally standalone, or is running within Joomla?

It might be easier to deal with simple query string args rather than the session. Set your jump page to 'append query string data' (or whatever that option is called). The value will then be in $_GET['element_name'], or maybe table_name___element_name, I forget if the short/long choice applies to query string args or not.

Remember you'll also need to sanitize the input before feeding it into any database queries. As a minimum, use mysql_real_escape_string(), which should prevent SQL injection.

-- hugh
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Staff online

Members online

Back
Top