Jump to content

yanviau

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Everything posted by yanviau

  1. same problem as before, because i put de {} on my variable concatenation so the { is in the string and not a php code
  2. Hello i try to explain my situation, I have a dynamic table so i need to build a dynamic radiobutton list and build a dynamic sql req. First of all i build my table with radio button in a while So the radio button is named rdYanViau ( in the html it's working no prob with that ) And in the same while i build a portion of my dynamic sql like that So in my insert this variable give me the FieldName and in the same while i build my $_POST variable for my sql sentence This value is '".$_POST['rdYanViau']."' After that i build my sql with those 2 variables, the problem is when i execute my sql insert where he's supose to insert my rdButton value ... it's insert the string '".$_POST['rdYanViau']."' who give me a 0 in the table, he's not getting the value of '".$_POST['rdYanViau']."' he's inserting the string in the table. Here's the echo of my sql sentence : my echo should look like : How i can build this dynamic sentence and have the radiobutton value and not the string value ... I hope you can understand my problem. Yan.
  3. Sorry maybe some feedback from other language, im new with php in my mind the easiest and normal thing is something like this but i know it's doesn't work. include ('class/general.php'); global $instance = new General(); function something() { $instance->check() }
  4. Thanks a lot for your help ! im gonna read this any other solution ? i would like prefer to have a variable that i don't need to pass in the function if it's possible.
  5. Hola to all php coder, Probably an easy one for you. Page.php include ('class/general.php'); $instance = new General(); function something() { $instance->check() } general.php <?php class General { function check() { echo "world"; } } Why the call of my class function doesnt work ? when my class declaration is outside the function = BOUM error When my class declaration is inside my function = working So i understand the fact than i need a global variable or something like that but i try to include ('class/general.php'); global $instance; $instance = new General(); And it's not the solution. Someone have any tips ? Sorry for my english.
×
×
  • 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.