Re: [PHP] ColdFusion / SQL > PHP / mySQL HELP!

2004-05-30 Thread Burhan Khalid
Curt Zirzow wrote:
* Thus wrote Chris Jernigan ([EMAIL PROTECTED]):
Hi everyone,
 

What's the problem? I have one week to do this. Oh, and did I mention that I
know VERY little about PHP / mySQL. I know NOTHING about ColdFusion or
MSSQL. And to top it off, the site in question contains over 300 .cfm files!
Does anyone have any idea how I could pull this off?

rename all files to .php and set the web server to parse .php files
as coldfusion.
lmao @ that one.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] ColdFusion / SQL > PHP / mySQL HELP!

2004-05-30 Thread Galen
Yeah, I'd say it's completely hopeless in a week. PHP is a totally 
different language than ColdFusion. SQL and MySQL may be different. The 
databases alone, as others have mentioned, could easily be a week even 
if you're experienced. Moving BOTH databases and scripting languages 
will probably mean you have to more reimplement, not just duplicate 
exact. Certain features may exist in your current database and not in 
MySQL, making it impossible to port your database as-is and requiring 
massively more function.

If you really want this thing done and don't know what you're doing, 
try giving yourself 6 months. Or more. And a very long read through the 
PHP and MySQL documentation. And lots of posts to the php list when you 
can't figure things out.

You could also try outsourcing your code. If ALL you want is an exact 
copy in PHP, I bet there are plenty off off-shore (well, off the U.S. 
shore) companies willing to do it for a very reasonable rate. I can't 
speak for their design and how easy the code will be to work with, but 
that would be the way to do it fast and cheap (well, relatively cheap). 
But it better be important, because I bet it would be massively cheaper 
to buy another ColdFusion license than to try and re-implement 
ColdFusion in PHP on this scale!

Please post back here and let us know what happened with this. I'm 
guessing you posted feeling pretty freaked out after your boss pushed 
you to do this. Or perhaps you just thought that ColdFusion and PHP 
were very similar and there was some kind of converter or easy process, 
like going from GIF to PNG or something. Unfortunately, that's just not 
the case. If you come back and ask smaller, more specific questions, 
preferably somewhat pre-researched (just spend 3 minutes googling), we 
can help and we promise not to group-lynch you :)

-Galen
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] cookies malfunctioning moving from windows to linux

2004-05-30 Thread Thomas Seifert
Ryan Schefke wrote:
I don't think that is it.  I believe session.save_path is only for sessions,
not cookies.  I'm only using cookies in the application. 

Can someone please help?
Thanks,
Ryan

Yeah, tell HOW you set the cookies.
There is really no difference in linux/windows-php in this cases.
thomas
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] [Newbie Guide] For the benefit of new members

2004-05-30 Thread Ma Siva Kumar
===
Please feel free to add more points and send 
to the list.
===
1. If you have any queries/problems about PHP 
try http://www.php.net/manual/en first. You 
can download a copy and use it offline also. 

Please also try 
http://www.php.net/manual/faq.php 
for answers to frequently answered questions 
about PHP (added by Christophe Chisogne).

2. Try http://www.google.com next. Searching 
for "php YOUR QUERY" may fetch you relevant 
information within the first 10 results.

3. There is a searchable archive of the 
mailing list discussion at 
http://phparch.com/mailinglists. Many of the 
common topics are discussed repeatedly, and 
you may get answer to your query from the 
earlier discussions. 

For example: One of the repeatedly discussed 
question in the list is "Best PHP editor". 
Everyone has his/her favourite editor. 
You can get all the opinions by going through 
the list archives. If you want a chosen list 
try this link : 
http://www.thelinuxconsultancy.co.uk/phpeditors/
(contributed by Christophe Chisogne).

4. Not sure if PHP is working or you want 
find out what extensions are available to 
you?

Just put the following code into a file with 
a .php extension and access it through your 
webserver:

 

If PHP is installed you will see a page with 
a lot of information on it. If PHP is not 
installed (or not working correctly) your 
browser will try to download the file.

(contributed by Teren and reworded by Chris W 
Parker)

5. If you are stuck with a script and do not 
understand what is wrong, instead of posting 
the whole script, try doing some research 
yourself. One useful trick is to print 
the variable/sql query using print or echo 
command and check whether you get what you 
expected. 

After diagnosing the problem, send the 
details of your efforts (following steps 1, 
2 & 3) and ask for help.

6. PHP is a server side scripting language. 
Whatever processing PHP does takes place 
BEFORE the output reaches the client. 
Therefore, it is not possible to access 
users'  computer related information (OS, 
screen size etc) using PHP. Nor can you 
modify any the user side settings. You need 
to go for JavaScript and ask the question in 
a JavaScript list.

On the other hand, you can access the 
information that is SENT by the user's 
browser when a client requests a page from 
your server. You can find details about 
browser, OS etc as reported by 
this request. - contributed by Wouter van 
Vliet and reworded by Chris W Parker.

7. Provide a clear descriptive subject line. 
Avoid general subjects like "Help!!", "A 
Question" etc.  Especially avoid blank 
subjects. 

8. When you want to start a new topic, open a 
new mail composer and enter the mailing list 
address [EMAIL PROTECTED] instead of 
replying to an existing thread and replacing 
the subject and body with your message.

9. It's always a good idea to post back to 
the list once you've solved your problem. 
People usually add [SOLVED] to the subject 
line of their email when posting solutions. 
By posting your solution you're helping the 
next person with the same question. 
[contribued by Chris W Parker]

10. Ask smart questions  
http://catb.org/~esr/faqs/smart-questions.html
[contributed by Jay Blanchard)

11. Do not send your email to the list with 
attachments. If you don't have a place to 
upload your code, try the many pastebin 
websites (such as www.pastebin.com).
[contributed by Burhan Khalid]
-- 
Integrated Management Tools for leather 
industry
--
http://www.leatherlink.net

Ma Siva Kumar,
BSG LeatherLink (P) Ltd,
Chennai - 600106

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Simple preg I think

2004-05-30 Thread Dave Carrera
Hi List,

How do I match an accordance of "./" in a string (without the quotes) ?

I have tried preg_match("/\.\//i", $str);

Which I thought would work , as per the manual, but no joy.

Any help or guidance is appreciated

Thank you in advance

Dave C

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.692 / Virus Database: 453 - Release Date: 28/05/2004
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Simple preg I think

2004-05-30 Thread Larry Brown
That works for me...

$testVal = "this is the ./command";

if(preg_match("/\.\//i", $testVal))
{
echo "hello";
}

This printed hello, then I removed the slash and it did not match and did
not print hello.  Sounds like it is a logic problem, or the variable is not
arriving as you expected.

-Original Message-
From: Dave Carrera [mailto:[EMAIL PROTECTED]
Sent: Sunday, May 30, 2004 6:55 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Simple preg I think


Hi List,

How do I match an accordance of "./" in a string (without the quotes) ?

I have tried preg_match("/\.\//i", $str);

Which I thought would work , as per the manual, but no joy.

Any help or guidance is appreciated

Thank you in advance

Dave C

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.692 / Virus Database: 453 - Release Date: 28/05/2004


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Submitting a form from tags

2004-05-30 Thread GodFoca
Heyp! I wanted to know if there is some way to do the submitting of a form
from a normal href link, instead of the big-dumb-gray button.

If it can't be done with PHP, how can it be done?

Thanks in advance,
Nicolas Sanguinetti

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] including an html file!!

2004-05-30 Thread little boy
when i include a html file i alwas do it with:
echo(include('htmlfile.html')); everythings works fine except the fact, that
after the included file the is a '1' printed out, anybody, an idea why???

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Submitting a form from tags

2004-05-30 Thread John W. Holmes
GodFoca wrote:
Heyp! I wanted to know if there is some way to do the submitting of a form
from a normal href link, instead of the big-dumb-gray button.
If it can't be done with PHP, how can it be done?
Why would you think PHP can do anything client side?
submit
or something like that...
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: including an html file!!

2004-05-30 Thread Johan Holst Nielsen
Little Boy wrote:
when i include a html file i alwas do it with:
echo(include('htmlfile.html')); everythings works fine except the fact, that
after the included file the is a '1' printed out, anybody, an idea why???
Because you dont need echo - include output the html :)
just

Check the documentation http://php.net/include - include returns 1 - 
thats why it is printed out when you do echo :)

--
Johan Holst Nielsen
Freelance PHP Developer
http://phpgeek.dk
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: including an html file!!

2004-05-30 Thread GodFoca
echo returns 1 on success, so the interpreter first evaluates the expression
inside the echo() call, and thus includes the html file, and then, as the
evaluation returned 1, it echoes 1 to the final file.

You should only do "include(...)", without the echo.

Good luck,
Nicolas

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Submitting a form from tags

2004-05-30 Thread GodFoca
Thank you very much!
N.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] cookies malfunctioning moving from windows to linux

2004-05-30 Thread Ryan Schefke
Thomas/All,

To summarize, my code containing cookies running on windows with a working
php installation (and Apache) executed all scripts containing cookies
perfectly. However, I transitioned my code to a Linux box with a fresh
install of PHP and now my cookies aren't working.  Below is an example of
setting and writing cookie values from one script.  Again, everything worked
like a charm on my old machine.  That's why I think it has something to do
with the Apache or PHP installation settings.

Note - on the new PHP installation I've had to change the "register_global"
switch to "on" in my php.ini file to get my code working.  Now the cookies
don't work...

Please, please help! 



= SET value of cookie =
setcookie ("showpoll_ck", "$ID"); // set cookie to show poll answers
header ('Location: '.$PHP_SELF);
= SET value of cookie =



= WRITE value of cookie =
'; 
if ($showpoll_ck == "$ID") {
echo 'Thank you for your vote.
Results:';
}

echo '';
?>
= WRITE value of cookie =


** PS, I also tried $_COOKIE['showpoll_ck'] when writing value...that
doesn't make a difference, that's why I think it's something with the
install.


-Original Message-
From: Thomas Seifert [mailto:[EMAIL PROTECTED] 
Sent: Sunday, May 30, 2004 3:43 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] cookies malfunctioning moving from windows to linux

Ryan Schefke wrote:
> I don't think that is it.  I believe session.save_path is only for
sessions,
> not cookies.  I'm only using cookies in the application. 
> 
> Can someone please help?
> 
> Thanks,
> Ryan


Yeah, tell HOW you set the cookies.
There is really no difference in linux/windows-php in this cases.


thomas

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: including an html file!!

2004-05-30 Thread Johan Holst Nielsen
Godfoca wrote:
echo returns 1 on success, so the interpreter first evaluates the expression
inside the echo() call, and thus includes the html file, and then, as the
evaluation returned 1, it echoes 1 to the final file.
Just to clear it out... include does not always return 1.
An example
File: includeFile.php


--
Johan Holst Nielsen
Freelance PHP Developer
http://phpgeek.dk
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] cookies malfunctioning moving from windows to linux

2004-05-30 Thread Hodicska Gergely
Hi!
On the server register_globals = off.
Use $_COOKIE['ID'] instead of $ID.
Felho
u.i. always develop with register_globals = off
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Submitting a form from tags

2004-05-30 Thread Marek Kilimajer
GodFoca wrote:
Heyp! I wanted to know if there is some way to do the submitting of a form
from a normal href link, instead of the big-dumb-gray button.
If it can't be done with PHP, how can it be done?
Thanks in advance,
Nicolas Sanguinetti
Thought it is possible to use javascript as suggested by John, the 
recomended way is to use styles to change the appearance of the submit 
button.

Example:

.submit {
 border: none;
 background-color: white;
}
.submit:hover {
 border: none;
 background-color: white;
 text-decoration: underline;
 cursor: hand;
 cursor: pointer;
}


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Data reading and writing for a chat

2004-05-30 Thread Stephen Lake
Hey All,

I got a question for you all.
What would be more effiecient for datastoring that is going to be constantly
extracted like in a chat application?
a MySQL database? or a Flat text file?

Right now I am working on a flat text file base but would also like to do it
as a database version too if the performance wouldn;t be hit that bad.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Data reading and writing for a chat

2004-05-30 Thread Johan Holst Nielsen
Stephen Lake wrote:
I got a question for you all.
What would be more effiecient for datastoring that is going to be constantly
extracted like in a chat application?
a MySQL database? or a Flat text file?
Well, the most effiecient would be the memory :) With some socket 
programming it should be possible to create a connection to each client 
- and a server show sent out the incoming messages to the clients.

But flat file vs. mysql. I would prefer MySQL - it is fast, it can 
handle a lot of request. If you use flatfile, you need to do some 
checking for the if the file is open already - so only one client at the 
time can write to the file - if can be very slow if a lot of users is on 
the chat at the same time and write a lot of messages - cause the whole 
file need to be locked every time a single user write a message.

So in my opinion, you should do some socket client and a server - or use 
a database :)

--
Johan Holst Nielsen
Freelance PHP Developer
http://phpgeek.dk
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] cookies malfunctioning moving from windows to linux

2004-05-30 Thread Ryan Schefke
Hi All,

Please consider this topic/subject closed.  There was conflict with my
firewall.

Ryan

-Original Message-
From: Hodicska Gergely [mailto:[EMAIL PROTECTED] 
Sent: Sunday, May 30, 2004 10:13 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] cookies malfunctioning moving from windows to linux

Hi!

On the server register_globals = off.
Use $_COOKIE['ID'] instead of $ID.

Felho

u.i. always develop with register_globals = off

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Associative array question

2004-05-30 Thread csnm
Hello,
If I have an associative array like:
$myFriendsAges['Tom']=25;
$myFriendsAges['Bill']=35;
$myFriendsAges['Al']=45;
$myFriendsAges['Mark']=55;
Is there a way to index name into a string.  I would like to be able to 
echo something like:

My friend Bill is 35 years of age.
Is there a way to do this?
Thanks
Tim
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Associative array question

2004-05-30 Thread Johan Holst Nielsen
[EMAIL PROTECTED] wrote:
Hello,
If I have an associative array like:
$myFriendsAges['Tom']=25;
$myFriendsAges['Bill']=35;
$myFriendsAges['Al']=45;
$myFriendsAges['Mark']=55;
Is there a way to index name into a string.  I would like to be able to 
echo something like:

My friend Bill is 35 years of age.
Is there a way to do this?
No sure what you mean... but it is possible this way:
$age) {
  echo "My friend ".$name." is ".$age." years of age.\n";
}
?>
--
Johan Holst Nielsen
Freelance PHP Developer
http://phpgeek.dk
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] "lasso" (a bit 0T)

2004-05-30 Thread Ryan A
Hey,
A prospective client has asked me to try to convert his Swedish site so that
visitors have a choice between Swedish and English, which is not a problem
as I am fluent in both languages. After going through the site to convert I
was just checking out the current pages and I saw that all the links have a
.lasso extension instead of the "normal" .htm,.html,.php etc

Did a quick search on google and found this
http://store.blueworld.com/lp7.lasso

sure looks like the same stuff but am not sure...

Anybody here worked with Lasso? any suggestions or comments?

Thanks,
-Ryan

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Windows to Linux -- Issues with mkdir()function and picture uploading

2004-05-30 Thread Ryan Schefke
Hi All,

 

I recently migrated code from my home server (windows) to a dedicated
hosting server (Linux).  I seem to have some issues with permissions and I'm
not sure how to fix it.

 

Take the simple script I wrote below.

=



 

It produces the following error:

Warning: mkdir() failed (Permission denied) in
/home/httpd/vhosts/tgwedding.com/httpdocs/tgwedding/php4.php on line 3

=

 

 

The above behavior is on the Linux machine.  Now, I run the same script on
my windows box and it works perfectly.

 

In another script I upload .jpg files to a directory.  It was working
perfectly on the windows home server and on the Linux box I get an access
denied error like this:

Warning: Unable to create
'/home/httpd/vhosts/tgwedding.com/httpdocs/tgwedding/users/client1/album/175
_7538.jpg': Permission denied in
/home/httpd/vhosts/tgwedding.com/httpdocs/tgwedding/photos.php on line 226

 

Could someone please?



[PHP] Re: Windows to Linux -- Issues with mkdir()function and picture uploading

2004-05-30 Thread Thomas Seifert
Ryan Schefke wrote:
The above behavior is on the Linux machine.  Now, I run the same script on
my windows box and it works perfectly.
windows has (afaik in its default settings) no good file-permissions.
the php-scripts usually run as the user the webserver runs as ...
so the webserver-user has to have write-permissions on the directory it 
needs to write to.
so either chown (change the owner) or chmod (change the permissions to 
be writable for the group or even other if needed) the directory.


thomas
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] PEAR Mail/smtp sending problem

2004-05-30 Thread Christopher J. Mackie
I'm following the PEAR docs to use Mail/SMTP. Below is the code I use,
swiped directly from the docs--I've changed the authorization data to
protect privacy, but otherwise it's identical (and email sent from a client
on this same machine using the same settings works fine).  I'm running PHP
4.3.6 ISAPI on Win2k3 Server, IIS6.0.

No errors are generated back to me, but the messages aren't going through.
I can't see the smtp server logs, so I don't know what's failing.

I'm new to PHP:  what am I missing? Is there a way that I can examine on my
end the errors that are presumably being generated at the SMTP server?

Tx, --CJ

send($recipients, $headers, $body);

?>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] CMS with best administration part?

2004-05-30 Thread Khan
Hello,
I'm looking for CMS that have great administration part. I'm not
interested in site displaying, speed, HTML standards or anything like 
that. I just need stable administration part with modules:

- News with archives;
- Blogs;
- Some users Can be administrators of blogs;
- Link directory;
- Navigation with multiple categories and subcategories;
- Different news for different parts of my web site;
Web site will be very large and it will have almost any module that you 
can find these days :)

I like XOOPS [1]. I also have my eye on Mambo [2]. A friend of mine told 
me that Drupal [3] has best community and if not drupal that I should 
check EZ [4].

What do you think? Which CMS has best PHP coding standards, best 
community, most modules etc...

Any advice is appreciated.
1. http://xoops.org/
2. http://mamobserver.com/
3. http://drupal.org/
4. http://ez.no/
If you know of some other CMS please send link. I know of 
opensourcecms.com but I'm interested in your opinions about project 
future, community etc.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Re: Windows to Linux -- Issues with mkdir()function and picture uploading

2004-05-30 Thread Ryan Schefke
Thomas, thanks, that worked perfectly!

-Original Message-
From: Thomas Seifert [mailto:[EMAIL PROTECTED] 
Sent: Sunday, May 30, 2004 2:32 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Windows to Linux -- Issues with mkdir()function and
picture uploading

Ryan Schefke wrote:
> The above behavior is on the Linux machine.  Now, I run the same script on
> my windows box and it works perfectly.

windows has (afaik in its default settings) no good file-permissions.

the php-scripts usually run as the user the webserver runs as ...
so the webserver-user has to have write-permissions on the directory it 
needs to write to.
so either chown (change the owner) or chmod (change the permissions to 
be writable for the group or even other if needed) the directory.



thomas

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: PEAR Mail/smtp sending problem

2004-05-30 Thread Khan
Christopher J. Mackie wrote:
I'm following the PEAR docs to use Mail/SMTP. Below is the code I use,
swiped directly from the docs--I've changed the authorization data to
protect privacy, but otherwise it's identical (and email sent from a client
on this same machine using the same settings works fine).  I'm running PHP
4.3.6 ISAPI on Win2k3 Server, IIS6.0.
No errors are generated back to me, but the messages aren't going through.
I can't see the smtp server logs, so I don't know what's failing.
I'm new to PHP:  what am I missing? Is there a way that I can examine on my
end the errors that are presumably being generated at the SMTP server?
you have Pear dedicated mailing list at http://pear.php.net/ Maybe 
someone will answer you sooner there.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Query Query

2004-05-30 Thread The Digital E
This may be better suited to the MySQL lists, but I'd appreciate it if 
someone could help. I'm probably just missing something stupid here but 
have been coding non-stop for a week and need another set of eyes.

Here's the line of code giving me an issue. I can print all the 
variables in the script to screen and know that they're ok. It returns 
successfully, but fails to update the database. I'm sure I'm about to 
feel pretty stupid, so fire away... just please fire the answer too.

$query="UPDATE $table_name SET company_name='$company', 
first_name='$first_name', last_name='$last_name', address='$address', 
city='$city', state_province='$state', postal_code='$postal', 
office_phone='$office', fax_phone='$fax', email='$email' WHERE 
company_name='$mod_dataset'";

Thanks
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Query Query

2004-05-30 Thread Khan
The Digital E wrote:
This may be better suited to the MySQL lists, but I'd appreciate it if 
someone could help. I'm probably just missing something stupid here but 
have been coding non-stop for a week and need another set of eyes.

Here's the line of code giving me an issue. I can print all the 
variables in the script to screen and know that they're ok. It returns 
successfully, but fails to update the database. I'm sure I'm about to 
feel pretty stupid, so fire away... just please fire the answer too.

$query="UPDATE $table_name SET company_name='$company', 
first_name='$first_name', last_name='$last_name', address='$address', 
city='$city', state_province='$state', postal_code='$postal', 
office_phone='$office', fax_phone='$fax', email='$email' WHERE 
company_name='$mod_dataset'";
you have 'company_name' in SET and then again in WHERE. This looks fishy.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Query Query

2004-05-30 Thread hitek
This may sound stupid, but are you actually EXECUTING the query?
$doit = mysql_query($query);
At 12:32 PM 5/30/2004, The Digital E wrote:
This may be better suited to the MySQL lists, but I'd appreciate it if 
someone could help. I'm probably just missing something stupid here but 
have been coding non-stop for a week and need another set of eyes.

Here's the line of code giving me an issue. I can print all the variables 
in the script to screen and know that they're ok. It returns successfully, 
but fails to update the database. I'm sure I'm about to feel pretty 
stupid, so fire away... just please fire the answer too.

$query="UPDATE $table_name SET company_name='$company', 
first_name='$first_name', last_name='$last_name', address='$address', 
city='$city', state_province='$state', postal_code='$postal', 
office_phone='$office', fax_phone='$fax', email='$email' WHERE 
company_name='$mod_dataset'";

Thanks
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Query Query

2004-05-30 Thread Daniel Clark
Can you send more of the code?   I looks good so far.

>>This may be better suited to the MySQL lists, but I'd appreciate it if 
>>someone could help. I'm probably just missing something stupid here but 
>>have been coding non-stop for a week and need another set of eyes.
>>
>>Here's the line of code giving me an issue. I can print all the 
>>variables in the script to screen and know that they're ok. It returns 
>>successfully, but fails to update the database. I'm sure I'm about to 
>>feel pretty stupid, so fire away... just please fire the answer too.
>>
>>$query="UPDATE $table_name SET company_name='$company', 
>>first_name='$first_name', last_name='$last_name', address='$address', 
>>city='$city', state_province='$state', postal_code='$postal', 
>>office_phone='$office', fax_phone='$fax', email='$email' WHERE 
>>company_name='$mod_dataset'";

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Query Query

2004-05-30 Thread Johan Holst Nielsen
The Digital E wrote:
$query="UPDATE $table_name SET company_name='$company', 
first_name='$first_name', last_name='$last_name', address='$address', 
city='$city', state_province='$state', postal_code='$postal', 
office_phone='$office', fax_phone='$fax', email='$email' WHERE 
company_name='$mod_dataset'";
What does mysql_error() says?
Tried to print out the query and execute it directly in the mysql prompt 
or phpmyadmin? What happens then?

--
Johan Holst Nielsen
Freelance PHP Developer
http://phpgeek.dk
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] hyperlink to the mysql data

2004-05-30 Thread CurlyBraces Technologies \( Pvt \) Ltd



hi , 
 
i have retrived  some perticular data 
from mysql , and them show in the web browser.( It is very few data 
)
When clicking on one of that that perticular data 
,  i want to show the whole information with related to the above 
mentioned part. 
So , can some body help me to add like this hyper 
link to the mysql data ?
 
thanx in advance
curlys 
 
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Query Query

2004-05-30 Thread Curt Zirzow
* Thus wrote The Digital E ([EMAIL PROTECTED]):
> 
> $query="UPDATE $table_name SET company_name='$company', 
> first_name='$first_name', last_name='$last_name', address='$address', 
> city='$city', state_province='$state', postal_code='$postal', 
> office_phone='$office', fax_phone='$fax', email='$email' WHERE 
> company_name='$mod_dataset'";

Funny how a mysql question gets a lot of attention...

select * from $table_name where company_name ='$mod_dataset'

expect:
 0 rows


Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] hyperlink to the mysql data

2004-05-30 Thread Daniel Clark
Can you post some of the code?

--Original Message Text---
From: CurlyBraces Technologies ( Pvt ) Ltd
Date: Mon, 31 May 2004 01:49:17 +0600

hi ,  
 
i have retrived  some perticular data from mysql , and them show in the web browser.( 
It is very few data ) 
When clicking on one of that that perticular data ,  i want to show the whole 
information with related to the above mentioned part.  
So , can some body help me to add like this hyper link to the mysql data ? 
 
thanx in advance 
curlys  
 





RE: [PHP] Re: Query Query

2004-05-30 Thread Mark Charette
> From: Khan [mailto:[EMAIL PROTECTED]
> you have 'company_name' in SET and then again in WHERE. This looks fishy.

Very common, often required, and perfectly legal.

Mark C.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Windows to Linux -- Getting errors still...

2004-05-30 Thread Ryan Schefke
Hello,

 

I successfully tested the GD library and several scripts with PHP locally on

my windows machine. I went to test the same php-files on my internet server
(Linux).
But on the server I get the following error: 

 

Warning: imagejpeg: unable to open 'temp.jpg' for writing in
/home/httpd/vhosts/tgwedding.com/httpdocs/tgwedding/photos.php on line 29

I already changed the file permissions but it didn't still work.

Does anybody know how to solve the problem?

 

This is line 29:

imagejpeg($base_image, 'temp.jpg'); //convert and save it to temp.jpg

 

Thanks,

Ryan



[PHP] drop down menu populated from a directory

2004-05-30 Thread Dustin Krysak
Hi there
What I am hoping to do is have a drop down menu that would be populated 
from the contents of a directory via php. Now The link names would be 
generated by the file name minus the file extension. Has anyone seen a 
tutorial on accomplishing something like this? All of the links would 
be to quicktime movies, but I am hoping to have them embedded in HTML 
(or PHP). So the movie is displayed in a browser

thanks in advance!
Dustin
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: drop down menu populated from a directory

2004-05-30 Thread Torsten Roehr
"Dustin Krysak" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi there
>
> What I am hoping to do is have a drop down menu that would be populated
> from the contents of a directory via php. Now The link names would be
> generated by the file name minus the file extension. Has anyone seen a
> tutorial on accomplishing something like this? All of the links would
> be to quicktime movies, but I am hoping to have them embedded in HTML
> (or PHP). So the movie is displayed in a browser
>
> thanks in advance!

This should do the trick:

// opening select tag goes here...

if ($handle = opendir('/path/to/files')) {
   while (false !== ($file = readdir($handle)))

   if ($file != '.' && $file != '..')

   $fileName = str_replace('.mov', '', $file);
   echo '' . $fileName . '';
   }
   }
   closedir($handle);
}

// closing select tag goes here

Haven't tested it. Hope it works and helps ;)

Regards,

Torsten Roehr

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Windows to Linux -- Getting errors still...

2004-05-30 Thread Thomas Seifert
 

This is line 29:
imagejpeg($base_image, 'temp.jpg'); //convert and save it to temp.jpg
Hi,
you should give it a path, i.e. ./temp.jpg or a full absolute path.

thomas
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Simple calender

2004-05-30 Thread Ryan A
Hey,

been looking at a lot of calenders most of them are either too big for my
use (whole page), not free, in javascript or  too complicated.

I require a calender that is simple, loads fast,small and not javascript,
the closest I found is at:
http://scripts.franciscocharrua.com/calendar.php

just two problems with it,
1. It does not have the days on top (eg: s,m,t,w,t,f,s - sunday,
mondayetc)
2. (not required but would be nice if it would) allow me to link from the
days of the calender to some page/s

I guess I could modify the above calender as it pretty good + open
source...but if anybody is using a calender already which is like the above
+ the 1 or two points I wroteyour response would be appreciated. ;-)

Thanks,
-Ryan

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] triggering php scripts...

2004-05-30 Thread Chris Wagner
hello,

i am wondering if there is a good way to trigger a php script from a web
page *without* sending the user to a new page or opening a new browser
windows.

for instance, suppose you wanted to make a button/link on a web page
that, when clicked, would cause a database entry to be decremented. 
however, you do not want to refresh the page or open a popup window or
any stinky little tricks like that.

or, if this is not possible, does anyone know how to trigger a php
script when someone accesses a particular file from an apache server? 
or if a file from a particular directory is downloaded...


thanks a lot!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] triggering php scripts...

2004-05-30 Thread Travis Low
Chris Wagner wrote:
i am wondering if there is a good way to trigger a php script from a web
page *without* sending the user to a new page or opening a new browser
windows.
for instance, suppose you wanted to make a button/link on a web page
that, when clicked, would cause a database entry to be decremented. 
however, you do not want to refresh the page or open a popup window or
any stinky little tricks like that.
Use a virtual include to call the php script.
or, if this is not possible, does anyone know how to trigger a php
script when someone accesses a particular file from an apache server? 
or if a file from a particular directory is downloaded...
I don't think you can do that unless the php script is used to access the file 
or perform the download you speak of.

cheers,
Travis
--
Travis Low


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: PHP Coding Standards

2004-05-30 Thread Travis Low
I have to say I like everything about the PEAR coding standards except for the 
K&R bracing style.  I much prefer:

  if( foo )
  {
 blah;
  }
to
  if( foo ) {
 blah;
  }
The latter form (K&R) conserves vertical space, but I find it a lot harder to 
follow.  Harder to move blocks of code around too.  I'm sure plenty of people 
disagree, so of course this is IMHO.

cheers,
Travis
Michael Nolan wrote:
charles kline wrote:
Hi all,
I was having a conversation with a friend and talking about coding 
standards in the open source community (focusing on PHP). I seem to 
remember there being a document out there that sort of laid it out 
pretty well.

Anyone know where I might find a copy?
PEAR has a page in their documentation about coding standards:
http://pear.php.net/manual/en/standards.php
HTH,
Mike
--
Travis Low


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] kill a script

2004-05-30 Thread CurlyBraces Technologies \( Pvt \) Ltd



i used this script to run that abc.pl in command 
prompt. It is perfectly running.
 

 
//$ExhibitA = 
shell_exec('/root/whole/abc.pl');
 
// Perfect.$ExhibitB = shell_exec('env -i 
/root/whole/abc.pl');
 
?>
* Actually i need to stop that as well , 

i got this result by ps -e 
 
1182 
pts/0    00:00:00 abc.pl
so , plz help for that , 
 
thank u 
 
curlys
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] CMS with best administration part?

2004-05-30 Thread Justin French
Also checkout Textpattern (in gamma right now, with g1.19 due in the 
next few days, which should be pretty much perfect for everything I've 
ever wanted).

http://www.textpattern.com/
FWIW, it *is* standards compliant, has clean/smart PHP code, has a 
beautiful interface, an amazing support community, an awesome 
developer/owner (Dean Allen), nice plug-in architecture, role based 
permissions structure, unlimited blogs (actually, they're sections of 
the site with categories and sub-categories), so it's really a CMS the 
feels "bloggy".

And as of g1.19, Textpattern will be open source.
What it does lack (I guess) is maturity and an abundance of plugins.  
But on the other hand, it has everything you want (I think), right out 
of the box, and a great community to help you write plugins.  At the 
moment it lacks message boards and things like that, but everything 
will be there eventually.

Even at this early stage, every other CMS I've ever used (and even the 
one I've spent a year developing part-time) pales in comparison.  It 
may not do "everything" right now, but it will -- trust me.  This thing 
will crush MT, Wordpress, and everything else out there, and will never 
cost you a cent.

I can't speak highly enough of it right now, and the future is very 
bright.

Justin French

On 31/05/2004, at 4:51 AM, Khan wrote:
Hello,
I'm looking for CMS that have great administration part. I'm not
interested in site displaying, speed, HTML standards or anything like 
that. I just need stable administration part with modules:

- News with archives;
- Blogs;
- Some users Can be administrators of blogs;
- Link directory;
- Navigation with multiple categories and subcategories;
- Different news for different parts of my web site;
Web site will be very large and it will have almost any module that 
you can find these days :)

I like XOOPS [1]. I also have my eye on Mambo [2]. A friend of mine 
told me that Drupal [3] has best community and if not drupal that I 
should check EZ [4].

What do you think? Which CMS has best PHP coding standards, best 
community, most modules etc...

Any advice is appreciated.
1. http://xoops.org/
2. http://mamobserver.com/
3. http://drupal.org/
4. http://ez.no/
If you know of some other CMS please send link. I know of 
opensourcecms.com but I'm interested in your opinions about project 
future, community etc.
---
Justin French
http://indent.com.au
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Simple preg I think [SOLVED]

2004-05-30 Thread Dave Carrera
Thanks to everyone who answered my request for help with this.

Yes, as some of you have pointed out, the pattern was correct but my logic
was wrong.

So once again thank you to all that helped.

Dave C  :-)

-Original Message-
From: Liu Jihua [mailto:[EMAIL PROTECTED] 
Sent: 31 May 2004 01:53
To: Dave Carrera
Subject: Re: [PHP] Simple preg I think


Dave Carrera
You are right!

$str= "asdf./test";
echo preg_match("/\.\//", $str ,$arr);  //print 1
print_r($arr);  

=== 2004-05-30 11:55:00 您在来信中写道:===

>Hi List,
>
>How do I match an accordance of "./" in a string (without the quotes) ?
>
>I have tried preg_match("/\.\//i", $str);
>
>Which I thought would work , as per the manual, but no joy.
>
>Any help or guidance is appreciated
>
>Thank you in advance
>
>Dave C
>
>---
>Outgoing mail is certified Virus Free.
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.692 / Virus Database: 453 - Release Date: 28/05/2004
> 
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php

= = = = = = = = = = = = = = = = = = = =


致
礼!
 
 
Liu Jihua
[EMAIL PROTECTED]
  2004-05-31






---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.692 / Virus Database: 453 - Release Date: 28/05/2004
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.692 / Virus Database: 453 - Release Date: 28/05/2004
 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Send HTML/plain text email using PHP

2004-05-30 Thread Jeremy Johnstone
Just as an FYI, the following line will get your email a lot of spam points in 
SpamAssassin:

$headers .= "X-MSMail-Priority: High\r\n";

Also, I don't know if this has already been suggested, but there is an awesome 
class named htmlMimeMail which will handle your needs perfectly. Google it 
and you will have everything you need.

-JEremy

On Friday 28 May 2004 05:49 am, Matt MacLeod wrote:
> I've been having a little trouble configuring a script to send a
> multipart email using PHP.
>
> The script send the message, but when I recieve the email it doesn't
> display the HTML version and I have to tell my mail client to displlay
> the plain text version (Mail on OS X 10.3.3).
>
> Here's the script:
>
> $headers .= "FROM: [EMAIL PROTECTED]";
> $headers .= "Reply-To: [EMAIL PROTECTED]";
> $nonhtml = strip_tags($emailsend);
> // This is the important part!
> // This content type identifies the content of the message.
> // The boundary delimits the plain text and html sections.
> // The value of the boundary can be anything - you can even use the
> same one we used here
> $headers .= "Content-Type: multipart/alternative;
> boundary=\"=_NextPart_000_002C_01BFABBF.4A7D6BA0\"\n\n";
> $headers .= "X-Priority: 1\r\n";
> $headers .= "X-MSMail-Priority: High\r\n";
> $headers .= "X-Mailer: PHP/" . phpversion()."\r\n";
> $headers .= "X-Sender: [EMAIL PROTECTED]";
> $headers .= "Return-Path: [EMAIL PROTECTED]";
> // Now begin your message, starting with the delimiter we specified in
> the boundary
> // Notice that two extra dashes (--) are added to the delimiters when
> // They are actually being used.
> $message = '--=_NextPart_000_002C_01BFABBF.4A7D6BA0
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit
>
> ';
> $message .= $nonhtml;
>
> $message .='
> ';
>
>
> // Now begin your HTML message, starting with the delimiter
> // Also notice that we add another content-type line which
> // lets the mail client know to render it in HTML
> $message .= '--=_NextPart_000_002C_01BFABBF.4A7D6BA0
> Content-Type: text/html; charset=us-ascii
> Content-Transfer-Encoding: 7bit
> ';
> $message .= $emailsend.'
>
> --=_NextPart_000_002C_01BFABBF.4A7D6BA0--';
>
> // Now send the mail.
> // The additional header, "-f [EMAIL PROTECTED]" is only required by
> // some configurations.
>
> echo $message;
> $v = '[EMAIL PROTECTED]';
>
> mail($v, "Test", $message ,$headers,"-f [EMAIL PROTECTED]");
>
>
>
> Any ideas would be gratefully received!
>
> Thanks,
> Matt

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] CVS web front end

2004-05-30 Thread Jeremy Johnstone
Although I have never seen a full app, I have seen PHP code which handles 
checkin/checkout of files as a class. I don't know if that will help you, but 
if it will then please let me know and I will dig it up.

-Jeremy

On Saturday 29 May 2004 09:50 pm, Brian V Bonini wrote:
> On Sat, 2004-05-29 at 15:01, Johan Holst Nielsen wrote:
> > Lists wrote:
> > > <>
> > >
> > > you're so right. I meant to send the link for horde
> > >
> > > http://www.horde.org/chora/
> >
> > Are you able to check out files? check in etc.?
> > As far as I can see - it is just a web cvs viewer?
> >
> > The request was "Not just a file/project
> > browser..."
> >
> > Anyway - thanks for the link to tcvs :D I have downloaded it and I like
> > it :D
>
> Since a web based CVS front-end is looking slim how about a
> recommendation on a web based file sharing app.? (possibly with some
> sort of primitive version control.)
>
> --
>
> s/:-[(/]/:-)/g
>
>
> BrianGnuPG -> KeyID: 0x04A4F0DC | Key Server: pgp.mit.edu
> ==
> gpg --keyserver pgp.mit.edu --recv-keys 04A4F0DC
> Key Info: http://gfx-design.com/keys
> Linux Registered User #339825 at http://counter.li.org

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php