GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   PHP Issue! what is a function for... (https://gfy.com/showthread.php?t=717399)

galleryseek 03-22-2007 11:41 PM

PHP Issue! what is a function for...
 
I'm trying to submit a couple textareas which contain actual php coding text as content, to a mysql table. The problem is... is mysql errors when I submit it because it tries to actually execute the php coding... while all I want to do is just store the coding in a table...

I know there has to be some type of function I can run the textarea variables through first that will temporarily render the coding so that php won't try to execute it, anyone know what it is?

Thanks

tical 03-22-2007 11:44 PM

encode the variables before they go in... decode after they're out

and i think the eval() function will be useful

http://www.php.net/eval

galleryseek 03-22-2007 11:48 PM

Quote:

Originally Posted by tical (Post 12134402)
encode the variables before they go in... decode after they're out

and i think the eval() function will be useful

http://www.php.net/eval

so I "encode" the variables first with eval?

ie:

$php_coding = eval($_POST['php_coding');

$query = "INSERT INTO table (php_coding) VALUES ($php_coding)";

?


All times are GMT -7. The time now is 12:11 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123