Hello again,
ok i may as well just dive in... heres an example of my problem.
//Class.php
class PHPClass
{
var $String;
var $Number;
}
//Page1.html
requires(Class.php);
$NewObject = new PHPClass;
// post vars from a form on the page with 2 text boxes
$NewObject->String = $_POST["InputtedText"];
$NewObject->Number = $_POST["inputtedNumber"];
$_POST["PassingObject"] = $NewObject;
// Link to Page2.html
//Page2.html
requires(Class.php)
$PassedObject = $_POST["PassingObject"];
echo $PassedObject->String, "<br><br>";
echo $PassedObject->Number;
Well theres the basics of my first situation with a problem, if i do that it doesnt seem to remember what kinda object it is when passed over, and with mine i have functions that it cant call because of this, ive tried type casting it as the object but doesnt like it.. anyway can anyone shed any light on if you can pass custom objects between pages through sessions or posts.
Now onto my 2nd question...
Can i use form objects such as text boxes without forms, i want to use text boxes but i want to pass the values over through sessions so i can keep the values for multiple pages opposed to the only one that the post action passes to. For one im not sure how to get the value out of a text box outside of a form.. would it be like this:
//Page1.html
session_start();
//Text box called "TText"
$RandomString = $TText;
echo $RandomString;
the problem i see with the above is that we havent acctually told the textbox (TText) that its a variable, usually the form does that with $_POST["TText"] anyway is the above possible in any way.. im sure it is..lol anyway this links onto my next problem with this system.
If im not using posts, then how do i specify to only send the value over when its got an inputted variable. I mean when you use posts then as soon as you press submit as far as i know it grabs the vars inputted and throws them over. If we are using this outside of the post system such as with sessions then to my knowledge there isnt a way to tell it to grab the variables on a link pressed or a button...
Anyway i think im rambling and just confusing people now..lol any help would be great, i can talk more about the 2nd problem later on if people know what im on about... haha thx again PHP community 🙂