thanks would work but I've figured out a better solution
eval("\$output = $input;");
I had already tried this but put a \ infront of $input. Thanks anway.
Search found 39 matches
- Wed Oct 20, 2010 6:44 pm
- Forum: PHP - Code
- Topic: running function from a string
- Replies: 3
- Views: 235
- Wed Oct 20, 2010 6:31 pm
- Forum: PHP - Code
- Topic: running function from a string
- Replies: 3
- Views: 235
running function from a string
I need to able to run a function from a string passed from a client but I can't get it to work. I've used eval($input) but can't use call_user_func because the parameters count may be different. I need something like: // read client input ( eg "myFunction()") $input = socket_read($spawn, 1...
- Wed Oct 20, 2010 12:55 pm
- Forum: PHP - Code
- Topic: Need help displaying php echo in div.
- Replies: 2
- Views: 154
Re: Need help displaying php echo in div.
ok thanks will look into it. I've tested putting the if(isset($_post) in the body and it works. Are there any security implications doing this?
- Wed Oct 20, 2010 11:05 am
- Forum: PHP - Code
- Topic: Need help displaying php echo in div.
- Replies: 2
- Views: 154
Need help displaying php echo in div.
Is it possible to display an echo in a div from an if statement before the html code? Basically I'm using server sockets and need to display the result before and after sending in a div box. You enter the string in an input box which sends to itself it then should display a message in the div saying...
- Thu Sep 02, 2010 2:51 pm
- Forum: HTML, CSS and other UI Design Technologies
- Topic: If noscript show text?
- Replies: 1
- Views: 2123
Re: If noscript show text?
you can use php to check javascript enabled:
Code: Select all
$results = get_browser();
if ($results["javascript"] == 1) {
<script></script>
}
else { echo "javas not enabled";}
- Thu Sep 02, 2010 2:37 pm
- Forum: HTML, CSS and other UI Design Technologies
- Topic: Side by Side div boxes?
- Replies: 2
- Views: 1802
Side by Side div boxes?
I have 2 div boxes in a containing div (900px). The left box is width 200px and I want the second div to get width automatically (would be 700px in this case). I tried this and works ok with float:left but as soon as you fill the box with text/pics the box moves below so it's no longer side by side....
- Tue Jul 06, 2010 5:21 pm
- Forum: PHP - Code
- Topic: sorting array after mysql query
- Replies: 9
- Views: 474
Re: sorting array after mysql query
it's fine i removed the order by and letter and doing it manually.
- Tue Jul 06, 2010 5:05 pm
- Forum: PHP - Code
- Topic: sorting array after mysql query
- Replies: 9
- Views: 474
Re: sorting array after mysql query
thanks this works well. I was making the mistake of not putting the ['user_company'] on the $row.
Out of interest why and how would you add a function to the database? What is you're using your own salts etc?
Out of interest why and how would you add a function to the database? What is you're using your own salts etc?
- Tue Jul 06, 2010 4:16 pm
- Forum: PHP - Code
- Topic: sorting array after mysql query
- Replies: 9
- Views: 474
Re: sorting array after mysql query
Populate your array collection normally, apply your decrypt function (which you generally want to apply at the database level, and not PHP), then perform a sort() or usort()
That's what I'm asking for help with.
- Tue Jul 06, 2010 3:53 pm
- Forum: PHP - Code
- Topic: sorting array after mysql query
- Replies: 9
- Views: 474
Re: sorting array after mysql query
When I use that I get:
FUNCTION *database name*.decrypt does not exist
These functions are PHP functions.
FUNCTION *database name*.decrypt does not exist
These functions are PHP functions.
- Tue Jul 06, 2010 3:27 pm
- Forum: PHP - Code
- Topic: sorting array after mysql query
- Replies: 9
- Views: 474
Re: sorting array after mysql query
Sorry I think you misunderstand the question. I already have an encrypy function of my own: encrypt() and decrypt(). I need to use these functions.
- Tue Jul 06, 2010 3:05 pm
- Forum: PHP - Code
- Topic: sorting array after mysql query
- Replies: 9
- Views: 474
sorting array after mysql query
I have a mysql query that works: $sql= "SELECT user_company FROM users WHERE user_company LIKE '$letter%' ORDER BY user_company"; $productR = mysql_query($sql) or die (mysql_error()); This worked and showed the company alphabetically. Now however I have encrypted the database so now it is ...
- Sun Jun 13, 2010 10:20 am
- Forum: PHP - Code
- Topic: make safe user input?
- Replies: 4
- Views: 488
Re: make safe user input?
So all input should remove tags as well?
- Sun Jun 13, 2010 9:00 am
- Forum: PHP - Code
- Topic: make safe user input?
- Replies: 4
- Views: 488
make safe user input?
Is mysql_real_escape_string adequate for user input for a username box using mysql? Checking other websites they state stripping tags if adequate. What's the most secure method?
- Fri Jun 04, 2010 10:17 am
- Forum: HTML, CSS and other UI Design Technologies
- Topic: minimum Y position of div box?
- Replies: 1
- Views: 1639
minimum Y position of div box?
I have a footer in a div box that works well and displays under the main div box for the website but certain pages have only a few lines of writing on and when this happens the footer is right near the top of the page. How can I make it so when the div box is lower than say 700px it defaults to top:...