Hi,
I have a string in PHP for example $string = "Blabla [word]";
I would like to filter the word between the '[' brackets.
The result should be like this $substring = "word";
thanks
Hi all,
I hope there is a simple solution!
I have a variable:
$results['q1'];
Is it possible to have the 'q1' element as a variable, something like this:
$results['$i[question]'];
Have not been able to find a solution on Google and researching the PHP manuals...
Anyone got a suggestion/ solution?
Thanks,
Homer.
I want to write php codes independent from template xhtml. (fonctions widthout any xhtml code inside )
Is there any good resource for studying?
Thanks in advance
Basically I want the books to be text book based, ie, author discusses the background,philosophy,syntax,semtantix for every language AND after every section there are questions what you learned so far and mini projects. Is there any books like this, I'm absolutely new to php/mysql/javascript and web development in general. Thanks in advance.
I recently upgraded to PHP 5.3 and since then I get (sporadic) error messages which indicate Apache (or may be the cleaner of the session files) has no permissions to the folder where the sessions are stored.
This happens randomly and can't be reproduced with exact steps, which led me to guess it is the session cleaner.
Any one has experience with such errors?
hi
i search for cours video or book or web tutorials to teach me how to build website
with php mysql css html
i need full project from A to Z
from the scratch
plz if any one know that tell me
Hai
I have one more doubt in apache mod_rewrite.
I want to rewrite the url
mydomain/index.php?category=1&id=1
To
mydomain/index/category/1/id/1
How I write rule in .htaccess
And what is the link that i have to give inside the a tag
Please give me a solution..
Hi,
In ASP.NET if I declare a variable (or object) static (or if I make a singleton) I can have it persist across multiple sessions of multiple users (it it registered in a server scope) so that I don't have to initialize it at every request.
Is there such a feature in PHP? Thanks
I am trying to create an outlook distribution list with php but I am having a hard time finding any resources or instructions on how to do so. Is it even possible to do this?
So I was reading about PHP namespaces, and I realized that in versions earlier than 5.3, if you write
namespace MyNamespace
you get a parse error.
Is there any way to avoid this i.e. make namespaces backwards-compatible, so the code doesn't simply crash?
Hi!
Is there any lightweight validation library available for PHP that easily can check if a specific string or value is valid for a known database type -
Something like this:
if (is_MEDIUMINT($var)) {
$this->db->insert($anothervar);
}
Thanks!
Is it possible to merge these two mysql queries into one? I want to get NOW() returned to a php variable.
mysql_query('INSERT INTO translate (IDRef, RefType, Lang, Text, LastChangeTS) VALUES ('.$id.', \''.$reftype.'\', \''.$lang.'\', \''.$text.'\', NOW()) ON DUPLICATE KEY UPDATE text = \''.$text.'\', LastChangeTS = NOW()');
mysql_query('SELECT LastChangeTS FROM translate WHERE IDRef = '.$id.' AND RefType = \''.$reftype.'\' AND Lang = \''.$lang.'\'');
I have a website in which I have a several php forms that I would like to fill out with auto generated content (for the purposes of exercising different content the user could submit). I would like to write a client side application that enables me to do so.
Is there any way either using webtoolkit, java script etc of doing this?
Thank all for your help,
PHPNoob
I'd like to learn PHP specifically for dealing with security vulnerabilities/exploits.
Could someone recommend a book?
I don't know if I need to learn HTML/CSS/XML/XHTML etc, do I have to learn those too? I don't really plan on designing websites, could anyone help me with this? :P
Hi!
I think most of us know about the infamous "Headers already sent" error in PHP. Can I check someway if headers already have been sent?
It would be really handy to do such, before going all out with trying to set some SESSION data or similar.
Thanks!
Hi
I'm using the following simple PHP proxy script but am getting a sporadic message at the destination site.
I'm thinking that perhaps it may have something to do with the HTTP_REFERER header, although I'm not explicitly defining it.
Can anyone tell me how to explicitly turn off or leave the HTTP_REFERER header blank?
Thanks in advance!
$url = $_GET['path'];
readfile($path);
I was wondering if the code below is the correct way to use mysqli_real_escape_string() when storing users data in a database.
Here is the PHP & MySQL code.
if (mysqli_num_rows($dbc) == 0) {
$mysqli = mysqli_connect("localhost", "root", "", "sitename");
$dbc = mysqli_query($mysqli,"INSERT INTO info (user_id, url)
VALUES ('$user_id', 'mysqli_real_escape_string($url)')");
}
if ($dbc == TRUE) {
$dbc = mysqli_query($mysqli,"UPDATE info
SET url = 'mysqli_real_escape_string($url)'
WHERE user_id = '$user_id'");
I want to calculate the number of Tweets of a Twitter Search, and a countup. Just like GigaTweet. How can I calculate this using PHP and the Twitter API?