Re: [PHP] Fatal error: Cannot redeclare

2008-08-05 Thread Micah Gersten
What is around this line? /global/WEB_DAT/documents/fme/institute/get/lehre/course/lib.php:25 Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Kai Kauer wrote: > Am Dienstag, 5. August 2008 15:46:42 schrieb Daniel Brown: > >> On Tue, Aug 5,

Re: [PHP] Echo in __GET()

2008-08-05 Thread Micah Gersten
You can write 2 functions to handle this. Value and OutputValue Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Tyler C. wrote: > Is the a way to have an array, or use __get() to provide different > data if you are echoing a variable, rather than if y

Re: [PHP] An appeal to your better nature

2008-08-05 Thread Micah Gersten
I'm on a shared host, I should have mentioned that. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Richard Heyes wrote: >> Seems like 1and1 screwed up their Apache installs. My site shows a >> blank page when I go to the domain, but when

Re: [PHP] An appeal to your better nature

2008-08-05 Thread Micah Gersten
Seems like 1and1 screwed up their Apache installs. My site shows a blank page when I go to the domain, but when I go to index.php, it works. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Richard Heyes wrote: > Hi, > > Seems my 1and1 server ha

Re: [PHP] Regular Expression by Exception

2008-08-04 Thread Micah Gersten
I don't know how to use the POSIX classes, but if you use preg_replace: preg_replace("/[^$params]/", '', $string); I think this will work. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Alberto García Gómez wrote: > Fellow

Re: [PHP] PHP querying mysql db for data limited to the last month

2008-08-04 Thread Micah Gersten
1. To get last months date, you can use strtotime("1 month ago") instead of mktime. 2. I don't see anywhere in the code where you are limiting by date. Try using > and <. Between is tricky on dates. Thank you, Micah Gersten onShore Networks Internal Developer http://www

Re: [PHP] E-Shop system

2008-08-04 Thread Micah Gersten
gt; card number, my application will secure it enough ? how can i get back > information that it's true...user paid the good and i can send him the > product ? > > thanks a lot for all your feedback. > > Paypal can handle itself, Bank Transfers and Credit Cards

Re: [PHP] HTTP PUT for file uploads

2008-08-01 Thread Micah Gersten
Is this a repetitive thing your clients will do many times? I recently created a backup solution using ssh keys and the pecl ssh extension to automate backups. Then a cronjob sorts the files on the server. It's a lot more secure than allowing PUTs. Thank you, Micah Gersten onShore Net

Re: [PHP] Dynamic Select Lists - 1st Selection Effects 2nd!

2008-07-31 Thread Micah Gersten
You're right. Same principles apply though. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Boyd, Todd M. wrote: > *cough* > > ...pretty sure he wrote "county", guys. ;) > > > Todd Boyd > Web Programmer > -- PHP G

Re: [PHP] Dynamic Select Lists - 1st Selection Effects 2nd!

2008-07-31 Thread Micah Gersten
What I usually do is default to the most common country and show the associated states. You can change the states if they change the country. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Andrew Ballard wrote: > On Thu, Jul 31, 2008 at 12:40 PM, Rahu

Re: [PHP] Dynamic Select Lists - 1st Selection Effects 2nd!

2008-07-31 Thread Micah Gersten
Maybe you should try this library. It comes with examples and is fairly easy to implement. http://xajaxproject.org/ Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Rahul S. Johari wrote: > > In theory your solution sounds extremely feasible & p

Re: [PHP] accessing variables within objects

2008-07-31 Thread Micah Gersten
Sorry about that, I forgot you got that link already. Here's an answer for you: I use overloading to dynamically call a function in another object if the current object does not have it. It helps because PHP does not support multiple inheritance. Thank you, Micah Gersten onShore Net

Re: [PHP] accessing variables within objects

2008-07-31 Thread Micah Gersten
Here's the PHP doc page. Let us know if you have more questions: http://us3.php.net/manual/en/language.oop5.overloading.php Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Philip Thompson wrote: > On Jul 30, 2008, at 1:29 PM, Jim Lucas wrote: >

Re: [PHP] upload file problem

2008-07-31 Thread Micah Gersten
Maybe check the return value of the function: http://us3.php.net/manual/en/function.move-uploaded-file.php Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Jignesh Thummar wrote: > I'm trying to upload the file. It's showing me successfully up

Re: [PHP] Using $_GET for POST

2008-07-30 Thread Micah Gersten
This page can help you understand them better: http://us2.php.net/manual/en/language.variables.superglobals.php Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Edward Diener wrote: > In handling an HTTP POST request I came across some PHP code, whic

Re: [PHP] accessing variables within objects

2008-07-30 Thread Micah Gersten
You might want to check the scope of the properties. If you want to access them outside of the class, make sure they are declared public. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Marten Lehmann wrote: > Hello, > > I'm using some php

Re: [PHP] Creating new site

2008-07-30 Thread Micah Gersten
s a lot of functionality make available. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Raido wrote: > Hi, > > There are many sites explaining how to build new site etc but I'd like > to hear what You suggest. (about how to plan whole thing and ho

Re: [PHP] Why PHP4?

2008-07-30 Thread Micah Gersten
Sometimes speed improvements require removing things. If you end up backwards supporting everything you end up with a big monster engine that is incredibly slow. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Hélio Rocha wrote: > Brainfuck rox!

Re: [PHP] Why PHP4?

2008-07-30 Thread Micah Gersten
and a smaller footprint. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Hélio Rocha wrote: > Sorry to disagree, > > But I think that with PHP4 a lot of people start thinking that they could be > programmers (maybe they can, developers it's ano

Re: [PHP] limiting the amount of emails sent at a time in a batch send

2008-07-29 Thread Micah Gersten
Here's a PEAR package that handles this: http://pear.php.net/package/Mail_Queue/ Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Richard Kurth wrote: > I want to limit these script two send 100 email and then pause for a > few seconds and then s

Re: [PHP] foreach question

2008-07-29 Thread Micah Gersten
You cannot do this: $row[] = $result; You need to loop around this: $row = mysql_fetch_assoc($result); Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Jason Pruim wrote: > Hey Everyone... > > So I am attempting to pull 2 random records fro

Re: [PHP] Start/Stop Service from program php

2008-07-26 Thread Micah Gersten
Generally, apache runs as www-data. What was the output of the command? Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com I need write a script execute some command, but try start or stop service like named, network this don't work I edit visudo and ad

Re: [PHP] It may be OT. phpmyadmin not opening.

2008-07-26 Thread Micah Gersten
I thought wampp was deprecated. Try xampp: http://www.apachefriends.org/en/index.html Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com mukesh yadav wrote: > hi , > sorry for posting here.I really dont know where to post I asked in the > mysql IRC

Re: [PHP] Regular Expression help need

2008-07-26 Thread Micah Gersten
Are you talking about looking at blogs in a mobile phone browser or actually downloading the blog into another format? Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Shelley wrote: > Ok, let me tell you what i want to achieve. > I want to transfer

Re: [PHP] Help with an error...

2008-07-25 Thread Micah Gersten
Philip Thompson wrote: > On Jul 24, 2008, at 12:40 PM, Micah Gersten wrote: > >> You cannot have commands in the middle of a string. > > Technically you can. > > $str = "Hi, my name is " . $this->getName(); This is correct, but is not in the middle of the str

Re: [PHP] Regular Expression help need

2008-07-25 Thread Micah Gersten
Are you trying to make it xml compatible or XHTML compatible? '&' is not valid HTML or XHTML as it has special meaning. If you want it to adhere to the standard and display correctly, you must use '&' Thank you, Micah Gersten onShore Networks Internal Developer http:

Re: [PHP] Help with an error...

2008-07-24 Thread Micah Gersten
It seems like you're still calling functions inside the string. Instead of concatenating, try the output buffering like was mentioned before. Also, if you want HTML tags in your PHP code, you need to end and start the PHP tags again, or print them as output in quotes. Thank you, Micah Ge

Re: [PHP] Help with an error...

2008-07-24 Thread Micah Gersten
He had code blocks in the middle of a string. That's what I was referring to. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Ted Wood wrote: > > Micah, > > Please provide an example of what your response was referring to in > the origi

Re: [PHP] Help with an error...

2008-07-24 Thread Micah Gersten
You cannot have commands in the middle of a string. Try building a string first, or use output buffering and then capture the buffer and use that as the string for the mail function. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com [EMAIL PROTECTED] wrote

Re: [PHP] Questions about finding ranges

2008-07-23 Thread Micah Gersten
Here's the info on the "weirdness" of between: http://dev.mysql.com/doc/refman/5.0/en/comparison-operators.html#operator_between Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com VamVan wrote: > Hey, > > For ranges you can also us

Re: [PHP] Multi-array - What am I missing?

2008-07-23 Thread Micah Gersten
Nice catch, I missed that. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Jason Norwood-Young wrote: > On Wed, 2008-07-23 at 13:52 -0500, Chris Ditty wrote: > >> Can anyone point me in the right direction? I know I am missing something >

Re: [PHP] Multi-array - What am I missing?

2008-07-23 Thread Micah Gersten
I'm still confused. What do you mean by same line? Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Chris Ditty wrote: > The array($calArrayTime. is actually another string. I am mainly trying > to get the values for ['day'][

Re: [PHP] Multi-array - What am I missing?

2008-07-23 Thread Micah Gersten
); } or foreach($myCalTime as $calTime => $calArrayTime){ $calArray[] = array($calArrayTime['day'] => array('NULL','linked-day '.strtolower($calArrayTime['reason']),$calArrayTime['day'])); Thank you, Micah Gersten onShore Networks Internal

Re: [PHP] Re: a question...

2008-07-23 Thread Micah Gersten
I just want to point out that public IPs are no longer given out as Class A, B, and C networks, but based on CIDR. You can use rwhois to figure out who has use of a certain subnet and what the range of it is. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com

Re: [PHP] session ok? [SOLVED]

2008-07-21 Thread Micah Gersten
When you use a header redirect, you start with a new page. Everything you did until then is gone. When you call session_start on the new page, it resumes the same session, not creates a new one. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com tedd wrote

Re: [PHP] Pasword Protecting several pages

2008-07-20 Thread Micah Gersten
checkLogin.php info.php login.php Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com R.C. wrote: > Thank you Micah, > > Could you give me some code on that? > > Ref > > "Micah Gersten" <[EMAIL PROTECTED]> wro

Re: [PHP] Pasword Protecting several pages

2008-07-20 Thread Micah Gersten
Set a session variable after the login has been confirmed and check for it at the beginning of every page. If it's not set, then redirect to login. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com R.C. wrote: > I'm still trying to get this sc

Re: [PHP] Counting Occurrences within an If statement

2008-07-20 Thread Micah Gersten
If it's a simple x < y, you might want to consider putting your if statement in the SQL query so you don't return so many rows. To make a counter, just set a variable like: $counter = 0; if ($x <$y) { print $row; $counter++ } Thank you, Micah Gersten onShore Networks In

[PHP] Anyone use Zend framework

2008-07-18 Thread Micah Gersten
Does anyone use the Zend Framework? Is it fast? -- Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] is there a problem with php script pulling HTML out of database as it writes the page??

2008-07-17 Thread Micah Gersten
For anyone interested, here's a nice book to get anyone started on PHP Security: http://oreilly.com/catalog/9780596006563/index.html Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Stut wrote: > On 17 Jul 2008, at 21:56, Robert Cummings wrote: &

Re: [PHP] is there a problem with php script pulling HTML out of database as it writes the page??

2008-07-17 Thread Micah Gersten
What can help is if one app only has access to it's own DB. Also, for mysql, there is the mysql_real_escape_string function for a reason. Also, for the web app, you can usually disable Administrative functions and grant a minimal set of permissions. Thank you, Micah Gersten onShore Net

Re: [PHP] Randomly missing a function

2008-07-17 Thread Micah Gersten
Try returning a value from CreateUser and checking it before sending the E-Mail. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Miles Thompson wrote: > An online signup script is randomly missing part of the task. These scripts > are in

<    1   2   3