Search Results

Showing results 1 to 40 of 459
Search took 0.03 seconds.
Search: Posts Made By: pritaeas ; Forum: PHP and child forums
Forum: PHP 4 Hours Ago
Replies: 1
Views: 80
Posted By pritaeas
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
Posted By pritaeas
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
Posted By pritaeas
Sorry, don't know another one.
Forum: PHP 1 Day Ago
Replies: 3
Views: 97
Posted By pritaeas
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
Posted By pritaeas
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
Posted By pritaeas
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
Posted By pritaeas
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
Posted By pritaeas
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
Posted By pritaeas
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
Posted By pritaeas
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
Posted By pritaeas
Are you sure that smtp has been enabled in exchange server ?
Forum: PHP 9 Days Ago
Replies: 7
Solved: strange results
Views: 237
Posted By pritaeas
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
Solved: strange results
Views: 237
Posted By pritaeas
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
Solved: strange results
Views: 237
Posted By pritaeas
$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
Posted By pritaeas
Start here:
http://w3schools.com/php/php_intro.asp
Forum: PHP 12 Days Ago
Replies: 1
Views: 205
Posted By pritaeas
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
Posted By pritaeas
http://www.codeplex.com/PHPExcel/
Forum: PHP 13 Days Ago
Replies: 4
Views: 216
Posted By pritaeas
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
Posted By pritaeas
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
Posted By pritaeas
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
Posted By pritaeas
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
Posted By pritaeas
http://phpexcel.codeplex.com/
Forum: PHP 13 Days Ago
Replies: 6
Views: 268
Posted By pritaeas
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
Posted By pritaeas
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
Posted By pritaeas
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
Posted By pritaeas
@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
Posted By pritaeas
Please share.
Forum: PHP 19 Days Ago
Replies: 3
Views: 314
Posted By pritaeas
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
Posted By pritaeas
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
Posted By pritaeas
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
Posted By pritaeas
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
Posted By pritaeas
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
Posted By pritaeas
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
Posted By pritaeas
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
Posted By pritaeas
Got your PM too, but the question was already nicely answered.
Forum: PHP 21 Days Ago
Replies: 14
Views: 468
Posted By pritaeas
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
Posted By pritaeas
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
Posted By pritaeas
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
Posted By pritaeas
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
Posted By pritaeas
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.
Showing results 1 to 40 of 459

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC