Forum: PHP 4 Hours Ago |
| Replies: 1 Views: 80 According to the specs it would be something like this:
$id = 1; // your person id for which you want to retrieve the notes
$ch =... |
Forum: PHP 5 Hours Ago |
| Replies: 3 Views: 129 You can use a regex to search for all text between <p> and </p>, probably something like:
<p>(.*?)</p> |
Forum: PHP 5 Hours Ago |
| Replies: 3 Views: 97 Sorry, don't know another one. |
Forum: PHP 1 Day Ago |
| Replies: 3 Views: 97 According to this thread: http://www.wampserver.com/phorum/read.php?2,41185,41191 it could be a problem with the oci.dll. Try downloading the correct version, and replacing the one from wamp. |
Forum: PHP 1 Day Ago |
| Replies: 3 Views: 129 I use a similar method for creating an rss feed. My solution is to extract only the first paragraph. If needed you could delete some or all tags from it (e.g. img). |
Forum: PHP 1 Day Ago |
| Replies: 4 Views: 134 echo < < < ENDHTML should be echo <<< ENDHTML
Second, Maybe it's a copy/paste issue, but you should use regular single or double quotes in php for strings, not backticks. |
Forum: PHP 1 Day Ago |
| Replies: 2 Views: 140 Am I correct, that you want to send a mass-email to your users (something like a newsletter), but you want to send only one, each time somebody visits your website ?
Why not make an administration... |
Forum: PHP 2 Days Ago |
| Replies: 2 Views: 141 OpenID:
http://openid.net/developers/libraries/
I've tried the PHP library, and the examples worked out-of-the-box. |
Forum: PHP 2 Days Ago |
| Replies: 1 Views: 130 How can there be a post in your table equal to or later then the current time ? |
Forum: PHP 8 Days Ago |
| Replies: 1 Views: 178 When you invoke the mail() function, it tries to connect to the smtp server, as specified in the php.ini
I don't know where you are trying to connect to, but not all mail servers allow this. If... |
Forum: PHP 8 Days Ago |
| Replies: 2 Views: 195 Are you sure that smtp has been enabled in exchange server ? |
Forum: PHP 9 Days Ago |
| Replies: 7 Views: 237 I now see that the action attribute of the form points to ../PHP/login.php
Can you try just login.php (assuming this is the name of your script).
If that doesn't work, try GET just for... |
Forum: PHP 9 Days Ago |
| Replies: 7 Views: 237 It may be too obvious but I have to ask: You do have php tags around statements ?
<?php
$uname = $_POST['login'];
$pword = $_POST['lpassword'];
echo "<br/>$uname<br/>";
?> |
Forum: PHP 9 Days Ago |
| Replies: 7 Views: 237 $query = 'SELECT id FROM user WHERE username="$uname"';
Since you are using single quotes for this string, $uname is not replaced with the value of your variable. You should use this:
$query... |
Forum: PHP 9 Days Ago |
| Replies: 3 Views: 261 Start here:
http://w3schools.com/php/php_intro.asp |
Forum: PHP 12 Days Ago |
| Replies: 1 Views: 205 Use this query. Replace 15 with the actual score from your user.
select score from table where score > 15 order by score asc limit 1 |
Forum: PHP 12 Days Ago |
| Replies: 7 Views: 15,720 http://www.codeplex.com/PHPExcel/ |
Forum: PHP 13 Days Ago |
| Replies: 4 Views: 216 if ( !preg_match('/^(?!^(\d+)$)[a-zA-Z-0-9][\w_\-\*\.]{2,14}$/', $_POST['username']) )
{
// invalid
}
As far as I can see, this works. |
Forum: PHP 13 Days Ago |
| Replies: 4 Views: 216 if ( !preg_match('/^\w[\w_\-\*\.]{2,14}$/', $_POST['username']))
\w matches letters and digits
{2,14} because you did not count the first \w An iterator applies only to the previous element,... |
Forum: PHP 13 Days Ago |
| Replies: 6 Views: 268 Currently PEAR supports the following list of licenses:
- PHP License
- Apache License
- LGPL
- BSD style
- MIT License
http://pear.php.net/manual/en/faq.devs.php#faq.licenses |
Forum: PHP 13 Days Ago |
| Replies: 6 Views: 268 I have only used it to connect to DB, but I've never had much problems with the PEAR packages. So yes, I think it's reliable. |
Forum: PHP 13 Days Ago |
| Replies: 7 Views: 296 http://phpexcel.codeplex.com/ |
Forum: PHP 13 Days Ago |
| Replies: 6 Views: 268 Is PEAR:Auth not an option ?
Think XML is the only one not supported yet by default. |
Forum: PHP 13 Days Ago |
| Replies: 1 Views: 245 Here is an explanation of how to send/receive xml through curl:
http://forums.digitalpoint.com/showthread.php?t=424619#post4004636 |
Forum: PHP 16 Days Ago |
| Replies: 3 Views: 288 Correct. See this link on how you can make it work:
http://php.net/manual/en/language.variables.scope.php
Although I'd recommend passing both arrays to the function, instead of using global... |
Forum: PHP 16 Days Ago |
| Replies: 4 Views: 986 @muralikalpana:
Actually, that will work if the file is called directly. In the case of Smarty however, this file is opened and parsed, so that won't work. |
Forum: PHP 18 Days Ago |
| Replies: 5 Views: 315 |
Forum: PHP 19 Days Ago |
| Replies: 3 Views: 314 Not quite sure what you mean... You cannot put jquery code inside php code. If you mean something else, please try explaining with some more detailed code. |
Forum: PHP 19 Days Ago |
| Replies: 7 Views: 343 No. The $key in this case will contain the array index.
PHP assumes
$values = array ('name','email','university','course','message');
to be this:
$values = array (0 => 'name', 1 => 'email',... |
Forum: PHP 19 Days Ago |
| Replies: 7 Views: 343 This code is wrong:
if ($key != 'subject' && $key != 'company') {
if( empty($_POST[$value]) ) { echo 'PLEASE FILL IN REQUIRED FIELDS'; exit; }
}
because $key will be an integer (so it... |
Forum: PHP 19 Days Ago |
| Replies: 1 Views: 201 The string value is stored in a session variable, not as a hidden field in the form, as that would defeat it's purpose. |
Forum: PHP 20 Days Ago |
| Replies: 6 Views: 352 I'm guessing you're trying to install this ?
http://www.phpmydirectory.com/
Did you contact their support ? |
Forum: PHP 20 Days Ago |
| Replies: 5 Views: 303 The first notice you get is because $_POST[dtext] may not have been set. This will result in an invalid query, after which it will fail, and put false in $result.
Since $result is false (because... |
Forum: PHP 20 Days Ago |
| Replies: 3 Views: 456 Then you could use this one:
SELECT * FROM agents WHERE (sponsor = '1' or sponsor = '2' or sponsor = '3') LIMIT 1 |
Forum: PHP 21 Days Ago |
| Replies: 14 Views: 468 Got your PM too, but the question was already nicely answered. |
Forum: PHP 21 Days Ago |
| Replies: 14 Views: 468 I suggest you read this first: http://www.daniweb.com/forums/announcement124-2.html
Come up with an idea. Then, if you have problems, show us your code and explain the problem. |
Forum: PHP 21 Days Ago |
| Replies: 4 Views: 327 Try this:
<?php
mysql_connect(HOST,USER,PASS);
@mysql_select_db("db303278079") or die( "Unable to select database");
$query="select * from ".RECORDS." WHERE area='manchester' order... |
Forum: PHP 21 Days Ago |
| Replies: 4 Views: 327 The if ($count) is inside the for loop, which doesn't get executed if there are no records found. Place the if ($count == 0) outside the for loop to fix it. |
Forum: PHP 21 Days Ago |
| Replies: 3 Views: 456 The LIMIT always applies to the end result of the query. Even without the limit, the count(*) will only return 1 result row.
I'm not sure of what you try to achieve. If you want the count per... |
Forum: PHP 22 Days Ago |
| Replies: 5 Views: 315 I've not yet come across this kind of service. This would be very cumbersome, because a lot of coordinates would point to the same address. |