Jump to content

dcyuri7

New Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

dcyuri7's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. lol looks like people are discouraged cause i made it complicated... All i need to do is: take $string; $string='echo "Bla";' then: some_cmd($string); Just need to run a php command using a string variable. Kind of like an include(); except not with files, with variables. ;)
  2. I've been attempting to research how to do this, but I am having very little luck. Basically, I am trying to run PHP code from a mysql returned string. Looks like this: [code]<?php // Database Connect (not typed fully - no need for you to see it, or me to type it) init_db.... and connection_of_db/ etc // Request info (dont mind this too much either - except for the "Content_Main" var) $sql_query=mysql_query("SELECT * FROM contentareas WHERE Page='{$_GET['id']}' AND SetName='Main'");   $Content_Main=mysql_result($sql_query,0,"Data"); // If I were to echo Content_Main, it would show this: echo "echo \"<p class=\\"secondary\\">; print \"Hello World\"; echo \"</p>\";"; // Heres my problem!! unknown_PHPfunction($Content_Main); // I want it to execute the code in the stored String, which happens to be most specifically: // print \"Hello World\";  -- And of course the two echo's surrounding it. [/code] Any help is greatly appreciated, yuri
  3. Here's my problem: I need to go from href links, to php handled functions. There has to be a way to do this. Of course I can use ?<var>=<data> in the url, but what if I just want to execute a function when the user clicks on an href? Ill be more specific to my problem... I am using switch statements to handle which page to include, by storing the next location to goto using SESSION variables. I want the user to be able to click on a link(HTML HREF) and for it to set the SESSION variable to the next location accordingly. Any help is greatly appreciated.
  4. I'm new to mysql/web interaction, but I keep getting the feeling that it is in some way "hackable". I mean... the username and password to access the db on my site are directly placed within the .php file that uses the data. Does anyone have any tips or reccomendations as far as security with access goes?
×
×
  • 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.