Jump to content
Old threads will finally start getting archived ×

milou

New Members
  • Posts

    4
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

milou's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi cyberRobot, thanks for your reply! then no oop for me...
  2. Hi all, I was wondering, if 1. I activate all errors except notices: error_reporting(E_ALL & ~E_NOTICE); ini_set('display_errors', 1); 2. my environment is php5.5 3. I get no errors Is my code then php5? I do not use any OOP, do I have to, to use php5? regards, Milou.
  3. Off course. I have a form, applying the above method I save the input textsfields in a file. I read this file later, there I apply the other above method. Then I try to print the text, where sadly these texts are printed as variablesnames iso variablesvalues. Why is eval() dangerous? in the file, $me is nicely printed as variablename. Only when printing, the variable will have a value.
  4. I've a quite simple question: I've a txt file with possibly some php variables (the file is filled by a form: before printing it in the file I apply $text= trim(mysql_escape_string(strip_tags($_POST['someField']))); ) . I read the file and save it in variables (using explode). Before I print these variables I apply $tekst = "".stripcslashes(htmlspecialchars_decode("".$text[0])); $text only contains one element. Sadly, the variables are not recognized as variables but are only printed as their name. For example this works fine, $me is one of those variables, I use double quotes "..": $personal_data=array(); $personal_data['first name'] = "Me $me again"; echo $personal_data['first name']; //$me is printed as its value This does not work (text[0] contains the $me variable) echo $text[0]; it prints $me as it variable name, not as its value echo "$me".$text[0]; Here the first $me value is printed fine, again $text[0] prints $me by its name The var_dump of $text[0] is string(11) "Testing $me" Somebody knows the solution?
×
×
  • 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.