where mysql_real_escape_string() is needed
is mysql_real_escape_string() with sprintf is need only at login page or at every mysql_query after loging in....for preventing from sql injection... ...
is mysql_real_escape_string() with sprintf is need only at login page or at every mysql_query after loging in....for preventing from sql injection... ...
Hi, I need help with writing regular expression for this pattern in PHP: [[{"type":"media","view_mode":"small","fid":"1","attributes":{"width":0,"height":0,"src":"http://localhost/x.png"}}]] This is part of the text and I am trying to replace this by something else. Would like to use preg_replace_all() but can't figure out what wou...
Hello all, I've got a somewhat complicated question for you cakephp experts. Basically, I have created a db table called "locations". Every month I will get this table sent to me in csv format from a client. Unfortunately, instead of updating this table, I will have to empty it and reimport all of the records. Unfortunately, I cannot al...
i want to create an interface of website in Arabic language....how can i do that...do i need any plugin to be already installed on my hosting server or mylocalhost how can i do that...please let me know in detail... ...
I've seen this done before on website, and I'm wondering how I would go about doing this. I'm trying to pop up an edit form on a database query site where on clicking the button, I would pass a var through $_POST to a php page, and have that php page be the pop-up such that the user can use the form contained within that php page to edit...
I have a site that is using frames. Is it still possible from the browser for someone to craft post data for one of the frames using the address bar? 2 of the frames are static and the other frame has php pages that communicate using post. And it doesn't appear to be possible but I wanted to be sure. ...
Hi. I'm trying to link to a stylesheet in my header file using $_SERVER["DOCUMENT_ROOT"] as follows: <head> <?php print "<link href='".$_SERVER["DOCUMENT_ROOT"]."/include/style.css' rel='stylesheet' type='text/css' />"; ?> <title>eLMS</title> </head> Since i'm testing locally, i'm getting the path as: <head> ...
Hello all, I know PHP scripts can run concurrently, but I notice that when I run a script and then run another script after it. It waits for the first to finish and then it does what it has to do? Is there an Apache config I have to change or do I use a different browser or something?!! Thanks all EDIT If I go to a different browser...
I'm looking for a good function for implementing pagination in a PHP site. The solution needs to work for vanilla PHP (no template language, no frameworks, etc). I'd like to be able to put something like the following in my code: <? $widgets = ... (some query)?> Page content here. <?= paginate($widgets) ?> This would output something ...
Hi, What is the fastest way to store config data in PHP so that it is easily changeable (via PHP)? First I thought about having config.php file, but I can't edit it on fly with PHP, at least not very simply? Then I thought about having XML files, but parsing them for each HTTP request is overwhelming. So, I thought about INI files, but ...
hi friends I want to build a code (PHP) for detecting online user's ip I have installed Discuz forum. it shows the ips itself. what i want is something different. I want to built a code to see the ip of all online users in one page. how i can do that ? I wrote a code. see: function getRealIpAddr() { if (!empty($_SERVER['HTTP_C...
Hello @all. i try to send a extra $php_var with jQuery true an ajax post function. in the 1st $.ajax i have $('.ui-icon-closethick').click(function(e) { e.preventDefault(); var parent = $(this).parent().parent(); $.ajax({ type: "POST", url: "server_items_reorder.php", data: 'id=' + parent.attr('i...
if i have two arrays i.e $text = 'i am passed :)'; $fn = array( ':)', ':-)', ';;)' ) $rep = array( 'smily1', 'smily2', 'smily3' ); $output = str_replace($fn, $rep, $text); echo $output; i want to make a class for this to use in future where i will want... how can i make a class for it... and also how can i create a fun...
I use PHP. I'm working on a way to automatically put together all my CSS files into one. I automatically load the CSS-files and then saves them to a larger one, for upload. In my local installation I have some @import lines that needs to be removed. It looks like this: @import url('css/reset.css'); @import url('css/grid.css'); @impor...
curl downloads http://mysite.com/Lunacy%20Disc%202%20of%202%20(U)(Saturn).zip but not http://mysite.com/Lunacy Disc 2 of 2 (U)(Saturn).zip Why is this the case? Do I need to convert it to the first format ? using the URL generated via urlencode($url) fails. ...
I have a php script that generates a pdf report. When we go to save the pdf document, the filename that Acrobat suggests is report_pdf, since the php script is named report_pdf.php. I would like to dynamically name the pdf file, so I don't have to type the appropriate name for the report each time that I save it. Asking on a news group...
I'm trying to match everything, but everything between [ and ]. everything between [ and ] is \[.+\] everything, but everything between [ and ] is [^(\[.+\])]+ The search text is valid[REGEX_EMAIL|REGEX_PASSWORD|REGEX_TEST] It matches "valid" and "REGEX_EMAIL|REGEX_PASSWORD|REGEX_TEST". It is supposed to match "valid", but not...
PHPSESSID Session Cookie how to know if PHPSESSID is cahnged in the current session icouldn't find way to detect if this variable change is changes as i want to check if the user has modfy the PHPSESSID or delete it (as deleteing it cause to create new one .) and i can't save the value of this in session as all session are cleared whe...
Hello, im making a small site And Instead of having a header.php and a footer.php with neccesarry info (functions,dbconnection, html head) and include on every page I'd like to have it all in index.php. But then I have to add pages to an whitelist and all this. I'd just like to be able to drop it in pages/ and then access it with index....
This question is similar to the one i asked here. But its related because I want to achieve the same effect. I want the users to be restricted to only accessing other pages on the site through the main page. The first page contains a frame for navigation and then a frame for content of the page they navigate to. I want it to be setup so ...