php-general Digest 19 Jun 2006 03:06:26 -0000 Issue 4193
Topics (messages 238228 through 238257):
Mail in Spam Box
238228 by: kartikay malhotra
238229 by: Rabin Vincent
238238 by: Travis Doherty
238253 by: Manuel Lemos
Includes, Require, Location, Other
238230 by: Beauford
238234 by: Larry Garfield
ImageCopyResized() function
238231 by: BBC
238232 by: Rabin Vincent
238233 by: Robert Cummings
SMS with php recommendation (a bit 0T i guess)
238235 by: Ryan A
238236 by: cajbecu
238239 by: John Nichel
238245 by: Ryan A
Re: Want some PHP e-book
238237 by: Stephen Lake
Get rid of line breaks
238240 by: Peter Lauri
238243 by: Martin Alterisio
mysql ORDER BY problem
238241 by: Rob W.
238242 by: Michael Rasmussen
238244 by: Rob W.
238246 by: John Nichel
238247 by: Peter Lauri
238248 by: Rob W.
Ok next php problem
238249 by: Rob W.
238250 by: João Cândido de Souza Neto
238251 by: Rob W.
238252 by: Chris
238254 by: Chris
238255 by: Rob W.
238256 by: tedd
Re: Mail in Spam Box - its working now
238257 by: kartikay malhotra
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
php-general@lists.php.net
----------------------------------------------------------------------
--- Begin Message ---
Hi all!
I've use PHP mail to send mail to my Gmail ID. But it gets delivered to my
Spam box and not the Inbox :(
Am I missing a header, signature, certificate?
Thanks
KM
--- End Message ---
--- Begin Message ---
On 6/18/06, kartikay malhotra <[EMAIL PROTECTED]> wrote:
I've use PHP mail to send mail to my Gmail ID. But it gets delivered to my
Spam box and not the Inbox :(
Am I missing a header, signature, certificate?
You're probably missing a header, but, who knows, you
haven't shown us any code.
Rabin
--- End Message ---
--- Begin Message ---
kartikay malhotra wrote:
> Hi all!
>
> I've use PHP mail to send mail to my Gmail ID. But it gets delivered
> to my
> Spam box and not the Inbox :(
>
> Am I missing a header, signature, certificate?
>
> Thanks
> KM
>
>
Is the system you are sending from listed in any RBLs? If you don't set
a subject line, SpamAssassin hits you hard, make sure you have a real
To:, From:, and Subject: header. The date header also needs to be set -
with the correct time.
Spam scores come from many different sources of information - two major
sources are the message itself and the server sending the message. If
you can send mail from this server using a normal mail client and it
does not get blocked as spam then it is probably your message. If
sending using a normal client still gets blocked as spam in you gmail
account chances are it is the server and not your code.
Travis
--- End Message ---
--- Begin Message ---
on 06/18/2006 12:29 PM kartikay malhotra said the following:
> I've use PHP mail to send mail to my Gmail ID. But it gets delivered to my
> Spam box and not the Inbox :(
>
> Am I missing a header, signature, certificate?
Maybe if you show how you are composing the message you are sending we
can advise.
--
Regards,
Manuel Lemos
Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
--- End Message ---
--- Begin Message ---
Hi,
If I were to have something like the following, what is the best way (or
best practice) to reload the page and display the error - or is there a
better way to do this. I want to keep the site uniform and don't want errors
popping up and making a mess.
Thanks
B
---------------------
$query = "select idn, name from manager order by name";
$results = mysql_query($query) or $mysqlerror = mysql_error();
if ($mysqlerror) {
$error = "$table_error$mysqlerror";
include("season.php"); - This is not what I really want and
in some cases
it cause problems.
exit;
}
else {
The rest of the code....
}
--- End Message ---
--- Begin Message ---
A couple of things.
1) Delay your output to the very end. That way you can still do page
redirects and build whole new pages depending on the errors you get.
2) Store errors in the session, then when building the page have a place
for "put any error messages here, then delete them from the session".
3) Better yet, use PHP's set_error_handler() features to break out of the flow
of the page completely when necessary. You can do a lot more error checking
that way, and it makes the code cleaner to boot.
4) Structure your code so that you can't send malformed SQL in the first
place. :-) If you're writing a static query, test it before it goes live
(duh). If it's a dynamic query, structure it in such a way that it can't not
be valid. (There's lots of ways do to that. I find arrays and implode() to
work well for me.) At worst you'll return an empty result set, which is not
an error but in fact a genuine situation you should be accounting for anyway.
What you're doing below is really just a fancy version of "mysql_query() or
die", which I've always felt is very sloppy code.
On Sunday 18 June 2006 10:33, Beauford wrote:
> Hi,
>
> If I were to have something like the following, what is the best way (or
> best practice) to reload the page and display the error - or is there a
> better way to do this. I want to keep the site uniform and don't want
> errors popping up and making a mess.
>
> Thanks
>
> B
>
> ---------------------
>
> $query = "select idn, name from manager order by name";
> $results = mysql_query($query) or $mysqlerror = mysql_error();
> if ($mysqlerror) {
> $error = "$table_error$mysqlerror";
> include("season.php"); - This is not what I really want and
> in some cases
> it cause problems.
> exit;
> }
> else {
> The rest of the code....
> }
--
Larry Garfield AIM: LOLG42
[EMAIL PROTECTED] ICQ: 6817012
"If nature has made any one thing less susceptible than all others of
exclusive property, it is the action of the thinking power called an idea,
which an individual may exclusively possess as long as he keeps it to
himself; but the moment it is divulged, it forces itself into the possession
of every one, and the receiver cannot dispossess himself of it." -- Thomas
Jefferson
--- End Message ---
--- Begin Message ---
Hi all.
is any one know how to use these functions, and what for are they:
imagecreatetruecolor();
imagecreatefromjpeg();
ImageCopyResized();
ImageDestroy();
please tell me how to use it like this function
mail($a,$b,$c,$d);
$a = "email direction where we email to";
$b = "subject of email, it will show on the inbox as a title";
$c = "the content of email";
$d = "type 'From :' and then followed by email where we send from";
--- End Message ---
--- Begin Message ---
On 6/18/06, BBC <[EMAIL PROTECTED]> wrote:
is any one know how to use these functions, and what for are they:
imagecreatetruecolor();
imagecreatefromjpeg();
ImageCopyResized();
ImageDestroy();
php.net/imagecreatetruecolor
php.net/imagecreatefromjpeg
php.net/imagecopyresized
php.net/imagedestroy
please tell me how to use it like this function
mail($a,$b,$c,$d);
php.net/mail
Read the manual: php.net/manual
Rabin
--- End Message ---
--- Begin Message ---
On Sun, 2006-06-18 at 12:02, BBC wrote:
> Hi all.
> is any one know how to use these functions, and what for are they:
> imagecreatetruecolor();
> imagecreatefromjpeg();
> ImageCopyResized();
> ImageDestroy();
I know how to use them all. I learned by reading here:
http://ca.php.net/manual/en/ref.image.php
Don't be lazy, RTFM!
> please tell me how to use it like this function
> mail($a,$b,$c,$d);
> $a = "email direction where we email to";
> $b = "subject of email, it will show on the inbox as a title";
> $c = "the content of email";
> $d = "type 'From :' and then followed by email where we send from";
Yep, just like the mail() function above, but with different parameters
that make contextual sense.
Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
--- End Message ---
--- Begin Message ---
Hey,
Right now I am using PSWIN to send SMS messages from
my php scripts, can anybody recommend a (reliable)
company that i can use instead?
We "fill up" on 25euros everytime on pswin, so i am
not looking for a "free" provider, just a reliable and
good priced one.
PSwin is good, problem is they are charging us a euro
.20 per day just for using the service, so even if we
dont send a single sms per day we are getting
charged...not good.
Thanks,
Ryan
------
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
--- End Message ---
--- Begin Message ---
http://www.clickatell.com/brochure/products/developer_solutions.php
Ryan A wrote:
> Hey,
>
> Right now I am using PSWIN to send SMS messages from
> my php scripts, can anybody recommend a (reliable)
> company that i can use instead?
>
> We "fill up" on 25euros everytime on pswin, so i am
> not looking for a "free" provider, just a reliable and
> good priced one.
>
> PSwin is good, problem is they are charging us a euro
> .20 per day just for using the service, so even if we
> dont send a single sms per day we are getting
> charged...not good.
>
> Thanks,
> Ryan
>
> ------
> - The faulty interface lies between the chair and the keyboard.
> - Creativity is great, but plagiarism is faster!
> - Smile, everyone loves a moron. :-)
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
--- End Message ---
--- Begin Message ---
Ryan A wrote:
Hey,
Right now I am using PSWIN to send SMS messages from
my php scripts, can anybody recommend a (reliable)
company that i can use instead?
We "fill up" on 25euros everytime on pswin, so i am
not looking for a "free" provider, just a reliable and
good priced one.
PSwin is good, problem is they are charging us a euro
.20 per day just for using the service, so even if we
dont send a single sms per day we are getting
charged...not good.
Thanks,
Ryan
http://www.clickatell.com/
--
By-Tor.com
...it's all about the Rush
http://www.by-tor.com
--- End Message ---
--- Begin Message ---
Hey,
>
http://www.clickatell.com/brochure/products/developer_solutions.php
Ok, clickatell seems to be the popular choice around
here, will have a look see
In the meantime feel free to recommend any others.
Thanks for replying guys.
Cheers!
Ryan
------
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
--- End Message ---
--- Begin Message ---
http://www.php.net/docs.php
You can download a CHM for Windows as well as PDF's and HTML Versions
"prolibertine" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>i am a newbie of php .i want get some php ebook to read.
> who can send me some
> thx
> --
> /**********************************************************
> * Love in AJAX J2ME and Python
> * Look at my website and my blog
> * http://www.pinzui.cn
> * Ï£Íû±¦±¦¿ÉÒÔÓÀÔ¶¿ìÀÖ£¬ÄãÊÇ×î°ôµÄ¡£
> **********************************************************/
>
--- End Message ---
--- Begin Message ---
Best group member,
I have a variable $content that is taken from a database. It contains line
breaks and the $content will be posted with line breaks.
I need to use this to insert this into a JavaScript function:
$output = 'writeRichText(\'rte1\', \''.$content.'\', 400, 200, true,
false);';
What is actually outputted is:
writeRichText('rte1', '<p>a</p>
<h2>b</h2>', 400, 200, true, false);
Because it is on different lines in the HTML the javascript function will
not be called correct.
So can I remove all line breaks in a variable with a function call?
Dream: $content = stripLineBreaks($content);
I read the manual, but without luck.
Thanks in advance.
--- End Message ---
--- Begin Message ---
2006/6/18, Peter Lauri <[EMAIL PROTECTED]>:
Best group member,
I have a variable $content that is taken from a database. It contains line
breaks and the $content will be posted with line breaks.
I need to use this to insert this into a JavaScript function:
$output = 'writeRichText(\'rte1\', \''.$content.'\', 400, 200, true,
false);';
What is actually outputted is:
writeRichText('rte1', '<p>a</p>
<h2>b</h2>', 400, 200, true, false);
Because it is on different lines in the HTML the javascript function will
not be called correct.
So can I remove all line breaks in a variable with a function call?
Dream: $content = stripLineBreaks($content);
I read the manual, but without luck.
Thanks in advance.
Check out http://php.net/addcslashes
maybe that will do the trick. If that doesn't work, you should try to
replace the line break character with the corresponding escape sequence.
--- End Message ---
--- Begin Message ---
Ok, here's what i got in my mysql db. I got a table listed with numbers as
follows
1
2
3
4
5
6
7
10
11
12
13
14
15
16
17
18
19
20
21
22
25
These numbers I can display fine. I'm using ..
$query="SELECT * FROM db ORDER BY numbers ASC";
Right now it displays it as
1
10
11
12
.....
2
22
23
25
....
3
4
5
6
7
Is there a way with my mysql query so that I can list the numbers in correct
order?
Any help is appricated.
- Rob
--- End Message ---
--- Begin Message ---
On Sun, 18 Jun 2006 15:55:14 -0500, Rob W. wrote:
>
> Is there a way with my mysql query so that I can list the numbers in
> correct order?
>
In what way is this problem related to PHP?
Try a MySQL group instead.
--
Hilsen/Regards
Michael Rasmussen
http://keyserver.veridis.com:11371/pks/lookup?op=get&search=0xE3E80917
--- End Message ---
--- Begin Message ---
It's not in general to mysql, it's how php and mysql is displaying it.
----- Original Message -----
From: "Michael Rasmussen" <[EMAIL PROTECTED]>
To: <php-general@lists.php.net>
Sent: Sunday, June 18, 2006 4:51 PM
Subject: [PHP] Re: mysql ORDER BY problem
On Sun, 18 Jun 2006 15:55:14 -0500, Rob W. wrote:
Is there a way with my mysql query so that I can list the numbers in
correct order?
In what way is this problem related to PHP?
Try a MySQL group instead.
--
Hilsen/Regards
Michael Rasmussen
http://keyserver.veridis.com:11371/pks/lookup?op=get&search=0xE3E80917
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Rob W. wrote:
It's not in general to mysql, it's how php and mysql is displaying it.
That's not what you asked. You asked how to do it with your query,
which has nothing, nadda, zip to do with PHP. You want MySQL to do the
sorting, look at the MySQL manual under the select syntax, or ask on the
MySQL list. You want PHP to do the sorting, look at PHP's array
functions; however, it'd be more efficient to go the MySQL route.
----- Original Message ----- From: "Michael Rasmussen" <[EMAIL PROTECTED]>
To: <php-general@lists.php.net>
Sent: Sunday, June 18, 2006 4:51 PM
Subject: [PHP] Re: mysql ORDER BY problem
On Sun, 18 Jun 2006 15:55:14 -0500, Rob W. wrote:
Is there a way with my mysql query so that I can list the numbers in
correct order?
In what way is this problem related to PHP?
Try a MySQL group instead.
--
By-Tor.com
...it's all about the Rush
http://www.by-tor.com
--- End Message ---
--- Begin Message ---
Just do:
SELECT * FROM thetable ORDER BY yourfieldyouwanttoorder
If you want it in reverse order you add DESC in the end.
/Peter
-----Original Message-----
From: John Nichel [mailto:[EMAIL PROTECTED]
Sent: Monday, June 19, 2006 5:51 AM
To: php-general@lists.php.net
Subject: Re: [PHP] Re: mysql ORDER BY problem
Rob W. wrote:
> It's not in general to mysql, it's how php and mysql is displaying it.
>
That's not what you asked. You asked how to do it with your query,
which has nothing, nadda, zip to do with PHP. You want MySQL to do the
sorting, look at the MySQL manual under the select syntax, or ask on the
MySQL list. You want PHP to do the sorting, look at PHP's array
functions; however, it'd be more efficient to go the MySQL route.
> ----- Original Message ----- From: "Michael Rasmussen" <[EMAIL PROTECTED]>
> To: <php-general@lists.php.net>
> Sent: Sunday, June 18, 2006 4:51 PM
> Subject: [PHP] Re: mysql ORDER BY problem
>
>
>> On Sun, 18 Jun 2006 15:55:14 -0500, Rob W. wrote:
>>
>>>
>>> Is there a way with my mysql query so that I can list the numbers in
>>> correct order?
>>>
>> In what way is this problem related to PHP?
>> Try a MySQL group instead.
>>
--
By-Tor.com
...it's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Yeah, I got this problem fixed. The datbase was listed under [chr] instead of
[integer].
Thanks for the help though.
----- Original Message -----
From: Xavier Casto
To: Rob W.
Cc: php-general@lists.php.net
Sent: Sunday, June 18, 2006 7:30 PM
Subject: Re: [PHP] mysql ORDER BY problem
Rob,
Your problem is the data type you are trying to sort. You have a few
solutions that can be used depending on your skills, access, and intent of the
data. As some had suggested, the problem may be best handled at the database
level, but it all depends on what your intent is.
When sorting a datatype of Character (or string) "10" will always come before
"2", you would either need to convert the "string" to a "number" or left pad
the string with "0" to get the result your are looking for.
Some good information for your issue can be found here:
http://dev.mysql.com/doc/refman/5.0/en/cast-functions.html
try the CAST or CONVERT functions in your query:
$query="SELECT * FROM db ORDER BY CONVERT(numbers, DECIMAL) ASC";
On 6/18/06, Rob W. < [EMAIL PROTECTED]> wrote:
Ok, here's what i got in my mysql db. I got a table listed with numbers as
follows
1
2
3
4
5
6
7
10
11
12
13
14
15
16
17
18
19
20
21
22
25
These numbers I can display fine. I'm using ..
$query="SELECT * FROM db ORDER BY numbers ASC";
Right now it displays it as
1
10
11
12
.....
2
22
23
25
....
3
4
5
6
7
Is there a way with my mysql query so that I can list the numbers in
correct order?
Any help is appricated.
- Rob
--- End Message ---
--- Begin Message ---
I got the previous question answered, Now here's my next problem.
With the numbers displaying correctly again I got:
1
2
3
4
5
6
7
10
11
12
13
14
15
16
17
18
19
20
21
22
25
listed in that order in the database
Now i'm trying to figure out how to write a syntax saying that if like number 8
isnt listed, display it.
I've tried doing a
if ($count != $data) {
echo "$data";
}
$count++;
But when I get to like id number 9 it dont work right because the next entrie
is displayed as 10 in the db. So that's my problem is to try and display only
them numbers that are not in there. I have also tried putting the numbers in to
an array and matching from there but it still come's up as the same as above.
- Rob
--- End Message ---
--- Begin Message ---
If i understood right, you want to list a sequence of numbers and follow
some data like:
1 - data of number 1
2 - data of number 2
...
If it's right, you can do it.
$query="SELECT * FROM db ORDER BY numbers DESC limit 1";
$maxnum=$numbers;
for ($num=1;$num<=$maxnum; $num++) {
$query="SELECT * FROM db where numbers=".$num;
echo $num." - ".$data."<br>";
}
""Rob W."" <[EMAIL PROTECTED]> escreveu na mensagem
news:[EMAIL PROTECTED]
I got the previous question answered, Now here's my next problem.
With the numbers displaying correctly again I got:
1
2
3
4
5
6
7
10
11
12
13
14
15
16
17
18
19
20
21
22
25
listed in that order in the database
Now i'm trying to figure out how to write a syntax saying that if like
number 8 isnt listed, display it.
I've tried doing a
if ($count != $data) {
echo "$data";
}
$count++;
But when I get to like id number 9 it dont work right because the next
entrie is displayed as 10 in the db. So that's my problem is to try and
display only them numbers that are not in there. I have also tried putting
the numbers in to an array and matching from there but it still come's up as
the same as above.
- Rob
--- End Message ---
--- Begin Message ---
No, but ok here goes the whole thing and sorry if I didnt explain this to
everyone before.
I am trying to duplicate a program that keep's track of server information,
switch ports, apc ports ect ect...
In the one column is switchports
This lists a total of 24 or 48 or how many ever ports are on that switch.
With in there is numbers like this for example:
1
2
3
4
5
6
7
10
11
12
13
14
15
ect... Hopefully that help's so far.
As far as listing the numbers is ok, I can pull it from the db and list all
the numbers just fine in numerical order as they are listed.
My problem is inside this script, when a new server is added, it pulls the
information from the database and finds an empty number, which is why,
though the whole list of 1 though 24 i need to get the information of the
missing numbers. These missing numbers HAFT to be dynamic and can not be
hard coded in because servers are always moved around and changed and added.
I hope this information was helpful for those of you trying to help solve my
problem.
- Rob
----- Original Message -----
From: "João Cândido de Souza Neto" <[EMAIL PROTECTED]>
To: <php-general@lists.php.net>
Sent: Sunday, June 18, 2006 8:38 PM
Subject: [PHP] Re: Ok next php problem
If i understood right, you want to list a sequence of numbers and follow
some data like:
1 - data of number 1
2 - data of number 2
...
If it's right, you can do it.
$query="SELECT * FROM db ORDER BY numbers DESC limit 1";
$maxnum=$numbers;
for ($num=1;$num<=$maxnum; $num++) {
$query="SELECT * FROM db where numbers=".$num;
echo $num." - ".$data."<br>";
}
""Rob W."" <[EMAIL PROTECTED]> escreveu na mensagem
news:[EMAIL PROTECTED]
I got the previous question answered, Now here's my next problem.
With the numbers displaying correctly again I got:
1
2
3
4
5
6
7
10
11
12
13
14
15
16
17
18
19
20
21
22
25
listed in that order in the database
Now i'm trying to figure out how to write a syntax saying that if like
number 8 isnt listed, display it.
I've tried doing a
if ($count != $data) {
echo "$data";
}
$count++;
But when I get to like id number 9 it dont work right because the next
entrie is displayed as 10 in the db. So that's my problem is to try and
display only them numbers that are not in there. I have also tried putting
the numbers in to an array and matching from there but it still come's up
as the same as above.
- Rob
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Rob W. wrote:
I got the previous question answered, Now here's my next problem.
With the numbers displaying correctly again I got:
1
2
3
4
5
6
7
10
11
12
13
14
15
16
17
18
19
20
21
22
25
listed in that order in the database
Now i'm trying to figure out how to write a syntax saying that if like number 8
isnt listed, display it.
Get them both into arrays and compare:
$good_list = range(1,10);
$db_list = array(4,7,10);
$missing = array_diff($good_list, $db_list);
http://php.net/array_diff
--
Postgresql & php tutorials
http://www.designmagick.com/
--- End Message ---
--- Begin Message ---
Rob W. wrote:
No, but ok here goes the whole thing and sorry if I didnt explain this
to everyone before.
I am trying to duplicate a program that keep's track of server
information, switch ports, apc ports ect ect...
In the one column is switchports
This lists a total of 24 or 48 or how many ever ports are on that switch.
With in there is numbers like this for example:
1
2
3
4
5
6
7
10
11
12
13
14
15
ect... Hopefully that help's so far.
As far as listing the numbers is ok, I can pull it from the db and list
all the numbers just fine in numerical order as they are listed.
My problem is inside this script, when a new server is added, it pulls
the information from the database and finds an empty number, which is
why, though the whole list of 1 though 24 i need to get the information
of the missing numbers. These missing numbers HAFT to be dynamic and can
not be hard coded in because servers are always moved around and changed
and added. I hope this information was helpful for those of you trying
to help solve my problem.
My answer will help you then. You know how many you have (24 or 48), so:
$good_list = range(1, 48);
$taken_list = array();
$query = "SELECT port FROM table";
$result = mysql_query($query);
while($row = mysql_fetch_assoc($result)) {
array_push($taken_list, $row['port']);
}
$not_taken = array_diff($good_list, $taken_list);
--
Postgresql & php tutorials
http://www.designmagick.com/
--- End Message ---
--- Begin Message ---
Ok but my problem is is that in the process of doing that, numbers can be
released so they pretty much haft to be dynamic. Any idea how I do it with
that.
IE:
1
2
3
6
9
10
...
So if them numbers change, which they can, because they are assigned port
numbers for servers, How do I make it so they are not scripted statically.
----- Original Message -----
From: "Chris" <[EMAIL PROTECTED]>
To: "Rob W." <[EMAIL PROTECTED]>
Cc: <php-general@lists.php.net>
Sent: Sunday, June 18, 2006 8:38 PM
Subject: Re: [PHP] Ok next php problem
Rob W. wrote:
I got the previous question answered, Now here's my next problem.
With the numbers displaying correctly again I got:
1
2
3
4
5
6
7
10
11
12
13
14
15
16
17
18
19
20
21
22
25
listed in that order in the database
Now i'm trying to figure out how to write a syntax saying that if like
number 8 isnt listed, display it.
Get them both into arrays and compare:
$good_list = range(1,10);
$db_list = array(4,7,10);
$missing = array_diff($good_list, $db_list);
http://php.net/array_diff
--
Postgresql & php tutorials
http://www.designmagick.com/
--- End Message ---
--- Begin Message ---
At 7:21 PM -0500 6/18/06, Rob W. wrote:
>I got the previous question answered, Now here's my next problem.
>
>With the numbers displaying correctly again I got:
>
>1
>2
>3
>4
>5
>6
>7
>10
>11
>12
>13
>14
>15
>16
>17
>18
>19
>20
>21
>22
>25
>
>listed in that order in the database
>
>Now i'm trying to figure out how to write a syntax saying that if like number
>8 isnt listed, display it.
>
>I've tried doing a
>
>if ($count != $data) {
> echo "$data";
>}
>$count++;
>
>But when I get to like id number 9 it dont work right because the next entrie
>is displayed as 10 in the db. So that's my problem is to try and display only
>them numbers that are not in there. I have also tried putting the numbers in
>to an array and matching from there but it still come's up as the same as
>above.
>
>- Rob
Rob:
Why?
If you want to show the number of records in your dB, then just show them. If
you want a counter, then add a counter but don't list the id number. Besides,
why would you want to anyway?
tedd
--
------------------------------------------------------------------------------------
http://sperling.com http://ancientstones.com http://earthstones.com
--- End Message ---
--- Begin Message ---
Hey!
Its working now. I replaced @mydomain with some valid mail address (gmail
address) and the mail was delivered to the Inbox. Feel free to use the code
if it helps. Attachments are allowed.
Also, it works without a subject (for gmail), but the mail address I used
now was genuine. Also genuine yahoo addresses are allowed, but not fake
ones. Pls tell me how does gmail know if the address from some remote domain
is genuine and not fake? After all, everything else is same.
Thanks Community
KM
On 6/19/06, Manuel Lemos < [EMAIL PROTECTED]> wrote:
on 06/18/2006 12:29 PM kartikay malhotra said the following:
> I've use PHP mail to send mail to my Gmail ID. But it gets delivered to
my
> Spam box and not the Inbox :(
>
> Am I missing a header, signature, certificate?
Maybe if you show how you are composing the message you are sending we
can advise.
--
Regards,
Manuel Lemos
Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
--
PHP General Mailing List ( http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---