[PHP] PHP Trick or Not - You Be the Judge

2010-06-30 Thread Brandon Rampersad
Hello guys, i was just doing some testing and was wondring if echo is faster
than print or print_r. I think since echo is a language construct and
print_r is a function, echo is faster.

Please let me know.

Thanks

-- 
A Brandon_R Production


[PHP] Brandon Rampersad wants to chat

2010-06-30 Thread Brandon Rampersad
---

Brandon Rampersad wants to stay in better touch using some of Google's
coolest new
products.

If you already have Gmail or Google Talk, visit:
http://mail.google.com/mail/b-b89a7a894d-806ae18504-KOgzrPXRyt_-nvSOA0A6kJ3ATvY
You'll need to click this link to be able to chat with Brandon Rampersad.

To get Gmail - a free email account from Google with over 2,800 megabytes of
storage - and chat with Brandon Rampersad, visit:
http://mail.google.com/mail/a-b89a7a894d-806ae18504-KOgzrPXRyt_-nvSOA0A6kJ3ATvY

Gmail offers:
- Instant messaging right inside Gmail
- Powerful spam protection
- Built-in search for finding your messages and a helpful way of organizing
  emails into "conversations"
- No pop-up ads or untargeted banners - just text ads and related information
  that are relevant to the content of your messages

All this, and its yours for free. But wait, there's more! By opening a Gmail
account, you also get access to Google Talk, Google's instant messaging
service:

http://www.google.com/talk/

Google Talk offers:
- Web-based chat that you can use anywhere, without a download
- A contact list that's synchronized with your Gmail account
- Free, high quality PC-to-PC voice calls when you download the Google Talk
  client

We're working hard to add new features and make improvements, so we might also
ask for your comments and suggestions periodically. We appreciate your help in
making our products even better!

Thanks,
The Google Team

To learn more about Gmail and Google Talk, visit:
http://mail.google.com/mail/help/about.html
http://www.google.com/talk/about.html

(If clicking the URLs in this message does not work, copy and paste them into
the address bar of your browser).

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



[PHP] Brandon Rampersad wants to chat

2010-06-28 Thread Brandon Rampersad


---

Brandon Rampersad wants to stay in better touch using some of Google's
coolest new
products.

If you already have Gmail or Google Talk, visit:
http://mail.google.com/mail/b-b89a7a894d-92135d717d-ghWMc8mdQtBa8hhz4DGhBvCe8-k
You'll need to click this link to be able to chat with Brandon Rampersad.

To get Gmail - a free email account from Google with over 2,800 megabytes of
storage - and chat with Brandon Rampersad, visit:
http://mail.google.com/mail/a-b89a7a894d-92135d717d-ghWMc8mdQtBa8hhz4DGhBvCe8-k

Gmail offers:
- Instant messaging right inside Gmail
- Powerful spam protection
- Built-in search for finding your messages and a helpful way of organizing
  emails into "conversations"
- No pop-up ads or untargeted banners - just text ads and related information
  that are relevant to the content of your messages

All this, and its yours for free. But wait, there's more! By opening a Gmail
account, you also get access to Google Talk, Google's instant messaging
service:

http://www.google.com/talk/

Google Talk offers:
- Web-based chat that you can use anywhere, without a download
- A contact list that's synchronized with your Gmail account
- Free, high quality PC-to-PC voice calls when you download the Google Talk
  client

We're working hard to add new features and make improvements, so we might also
ask for your comments and suggestions periodically. We appreciate your help in
making our products even better!

Thanks,
The Google Team

To learn more about Gmail and Google Talk, visit:
http://mail.google.com/mail/help/about.html
http://www.google.com/talk/about.html

(If clicking the URLs in this message does not work, copy and paste them into
the address bar of your browser).



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



[PHP] Brandon Rampersad wants to chat

2010-06-28 Thread Brandon Rampersad


---

Brandon Rampersad wants to stay in better touch using some of Google's
coolest new
products.

If you already have Gmail or Google Talk, visit:
http://mail.google.com/mail/b-b89a7a894d-64536000e2-4urVbjaule33mrAn37NJq9MKldk
You'll need to click this link to be able to chat with Brandon Rampersad.

To get Gmail - a free email account from Google with over 2,800 megabytes of
storage - and chat with Brandon Rampersad, visit:
http://mail.google.com/mail/a-b89a7a894d-64536000e2-4urVbjaule33mrAn37NJq9MKldk

Gmail offers:
- Instant messaging right inside Gmail
- Powerful spam protection
- Built-in search for finding your messages and a helpful way of organizing
  emails into "conversations"
- No pop-up ads or untargeted banners - just text ads and related information
  that are relevant to the content of your messages

All this, and its yours for free. But wait, there's more! By opening a Gmail
account, you also get access to Google Talk, Google's instant messaging
service:

http://www.google.com/talk/

Google Talk offers:
- Web-based chat that you can use anywhere, without a download
- A contact list that's synchronized with your Gmail account
- Free, high quality PC-to-PC voice calls when you download the Google Talk
  client

We're working hard to add new features and make improvements, so we might also
ask for your comments and suggestions periodically. We appreciate your help in
making our products even better!

Thanks,
The Google Team

To learn more about Gmail and Google Talk, visit:
http://mail.google.com/mail/help/about.html
http://www.google.com/talk/about.html

(If clicking the URLs in this message does not work, copy and paste them into
the address bar of your browser).



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



Re: [PHP] Attachment to email from form.

2010-06-28 Thread Brandon Rampersad
fuck no

On Mon, Jun 28, 2010 at 8:23 AM, Gary  wrote:

> Richard
>
> Thank you again for your kind help.
>
> Gary
>
>
> "Richard Quadling"  wrote in message
> news:aanlktikwujmpbqijd_ee9mbfpxa92ssexjddng2fg...@mail.gmail.com...
> > On 26 June 2010 13:14, Gary  wrote:
> >> Richard
> >>
> >> Please accept my apology in that my response was sent directly to you
> and
> >> not the group, I hit 'Reply" instead of 'Reply to Group'.
> >>
> >> Gary
> >
> > No problem.
> >
> > Here is an example of my code using the RMail script from phpguru.org.
> > It was previously known as html_mime_mail5.
> >
> >  > // Create a new message.
> > $o_Mail = new RMail();
> >
> > // As we are going to use SMTP to send the email, we need to know
> > where to send it.
> > // On my setup, the SMTP ini setting is what I'll be using.
> > // You can also supply any SMTP AUTH settings needed here.
> > $o_Mail->setSMTPParams
> > (
> > ini_get('SMTP'),
> > 25,
> > Null,
> >
> registrySettings_V2::read(registrySettings_V2::REG_SMTP_AUTH_LOGIN_REQUIRED),
> > registrySettings_V2::read(registrySettings_V2::REG_SMTP_AUTH_LOGIN),
> > registrySettings_V2::read(registrySettings_V2::REG_SMTP_AUTH_PASSWORD)
> > );
> >
> >
> > // Set the From header
> > $o_Mail->setHeader('From', '"Richard Quadling" ');
> >
> > // Some other useful headers.
> > // $o_Mail->setHeader('Return-Path', '"Return to me"
> > ');
> > // $o_Mail->setHeader('Return-Receipt-To', '"Delivery Receipt"
> > ');
> > // $o_Mail->setHeader('Disposition-Notification-To', '"Read or Delete
> > Notification" ');
> >
> > // Add the subject.
> > $o_Mail->setSubject($s_Subject);
> >
> > // Add the HTML with a location of the images to be added to the email
> > automatically, rather than relying on internet to provide images
> > // which is blocked by various security levels of Outlook.
> > $o_Mail->setHTML($s_HTMLMessage, 'D:/Global Web Documents/images/');
> >
> > // Let's add an attachment.
> > // The filename, the mime type, the encoding and the file name to show
> > the attachment as.
> > $o_Mail->addAttachment(new fileAttachment('D:/Uploaded/content.zip',
> > 'application/zip', new Base64Encoding(), 'YourContent.zip'));
> >
> > // If you want to keep copies of your emails, then setCc is the method to
> > use.
> > $o_Mail->setCc('r...@nowhere.co.uk');
> >
> > // Finally, send the email to the recipients (held in an array to
> > allow for multiple addresses) using SMTP.
> > $o_Mail->send(array('"Your recipient\'s name"
> > '), 'smtp');
> > ?>
> >
> >
> > --
> > -
> > Richard Quadling
> > "Standing on the shoulders of some very clever giants!"
> > EE : http://www.experts-exchange.com/M_248814.html
> > EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
> > Zend Certified Engineer :
> http://zend.com/zce.php?c=ZEND002498&r=213474731
> > ZOPA : http://uk.zopa.com/member/RQuadling
> >
> > __ Information from ESET Smart Security, version of virus
> > signature database 5233 (20100628) __
> >
> > The message was checked by ESET Smart Security.
> >
> > http://www.eset.com
> >
> >
> >
>
>
>
> __ Information from ESET Smart Security, version of virus signature
> database 5233 (20100628) __
>
> The message was checked by ESET Smart Security.
>
> http://www.eset.com
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
A Brandon_R Production


Re: [PHP] mysql case statement

2010-06-27 Thread Brandon Rampersad
no

On Sun, Jun 27, 2010 at 8:29 PM, David McGlone  wrote:

> On Sunday 27 June 2010 04:08:24 Tanel Tammik wrote:
> > Hello,
> >
> > how to select only if value is present?
> >
> > $query = $db->query("select menus.id, menus.name,
> >   case
> > when panels.id is not null then '1'
> > end as hiddenpanel
> >
> > from " . \DB_MENUS . " as menus
> >   left join " . \DB_HIDDENPANELS . " as panels on (menus.id =
> > panels.menu_id)
> > where menus.id='" . (int)$id . "'
> > ");
> >
> > i would like to select hiddenpanel only if there is a corresponding value
> >  in DB_HIDDENPANELS. At the moment i get NULL if there is no
> corresponding
> >  value in HIDDENPANELS table!
>
> I would use an if statement since you only need to determine true or false.
> Something like:
>
> $query = $db->query("select menus.id, menus.name,
>  from " . \DB_MENUS . " as menus
>   left join " . \DB_HIDDENPANELS . " as panels on (menus.id =
>  panels.menu_id)
> where menus.id='" . (int)$id . "'
> ");
>
> if (empty(DB_HIDDENPANELS)) {
>echo "";
>
> }
>
> else {
>echo "hiddenpanel";
>
> }
>
> But I would wait for others to chime in on this one, because I'm very far
> from
> an expert, there's also got to be a much better efficient way to write the
> if
> statement above, but it's what I would do in a case like this until I found
> a
> better way.
>
> --
> Blessings,
> David M.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
A Brandon_R Production


[PHP] Brandon Rampersad wants to chat

2010-06-27 Thread Brandon Rampersad


---

Brandon Rampersad wants to stay in better touch using some of Google's
coolest new
products.

If you already have Gmail or Google Talk, visit:
http://mail.google.com/mail/b-b89a7a894d-a89de444ea-qNA2NPWwf-0ll8Gz7bfGZh8MgfI
You'll need to click this link to be able to chat with Brandon Rampersad.

To get Gmail - a free email account from Google with over 2,800 megabytes of
storage - and chat with Brandon Rampersad, visit:
http://mail.google.com/mail/a-b89a7a894d-a89de444ea-qNA2NPWwf-0ll8Gz7bfGZh8MgfI

Gmail offers:
- Instant messaging right inside Gmail
- Powerful spam protection
- Built-in search for finding your messages and a helpful way of organizing
  emails into "conversations"
- No pop-up ads or untargeted banners - just text ads and related information
  that are relevant to the content of your messages

All this, and its yours for free. But wait, there's more! By opening a Gmail
account, you also get access to Google Talk, Google's instant messaging
service:

http://www.google.com/talk/

Google Talk offers:
- Web-based chat that you can use anywhere, without a download
- A contact list that's synchronized with your Gmail account
- Free, high quality PC-to-PC voice calls when you download the Google Talk
  client

We're working hard to add new features and make improvements, so we might also
ask for your comments and suggestions periodically. We appreciate your help in
making our products even better!

Thanks,
The Google Team

To learn more about Gmail and Google Talk, visit:
http://mail.google.com/mail/help/about.html
http://www.google.com/talk/about.html

(If clicking the URLs in this message does not work, copy and paste them into
the address bar of your browser).



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



Re: [PHP] Problem with ssh2_connect

2010-06-23 Thread Brandon Rampersad
Do you have lexneter installed. I think that could be the problem.

2010/6/23 Radek KrejĨa 

> >
> >Make sure that
> >
> > the key file exists by that name in the location you're
> > specifying (hint: use a full path).
> Its in ssh2_auth_public..., yes, I am using full path there.
> > it is the right key for that server.
> Yes, I use it with ssh command from line on the same computer.
> > the permissions on the file are very strict (chmod 0400
> ssh-rsa).
> My private key has 0400
>
> >
> >
> > I got error message immediately after $connection = ssh2_connect('
> test.starnet.cz', 22, array('hostkey'=>'ssh-rsa'), $methods);, so
> $connection is invalid resource for other function.
>
> I have rsa keys, but if I use ssh-dss (hostkey), Its without warning - but
> I cant connect with keys.
>
> Radek
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
A Brandon_R Production


Re: [PHP] howto run sql script with php?

2010-06-13 Thread Brandon Rampersad
niggers

On Sun, Jun 13, 2010 at 11:07 AM, Stephan Ebelt  wrote:

> On Sun, Jun 13, 2010 at 12:52:18PM +0200, Stephan Ebelt wrote:
> [...]
> > > Use mysqli - it supports running multiple queries at once.
> >
> > sometimes its as easy as that. I'll give it a try.
>
> not quite as easy:  mysqli->multi_query() works nice with many queries in a
> string but that DELIMITER syntax still produces an error...
>
> stephan
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
A Brandon_R Production


[PHP] Brandon Rampersad wants to chat

2010-06-10 Thread Brandon Rampersad
---

Brandon Rampersad wants to stay in better touch using some of Google's
coolest new
products.

If you already have Gmail or Google Talk, visit:
http://mail.google.com/mail/b-b89a7a894d-87f44ca42c-QxVqdDj-Y-taKgwQ_V0g-Q8WRBY
You'll need to click this link to be able to chat with Brandon Rampersad.

To get Gmail - a free email account from Google with over 2,800 megabytes of
storage - and chat with Brandon Rampersad, visit:
http://mail.google.com/mail/a-b89a7a894d-87f44ca42c-QxVqdDj-Y-taKgwQ_V0g-Q8WRBY

Gmail offers:
- Instant messaging right inside Gmail
- Powerful spam protection
- Built-in search for finding your messages and a helpful way of organizing
  emails into "conversations"
- No pop-up ads or untargeted banners - just text ads and related information
  that are relevant to the content of your messages

All this, and its yours for free. But wait, there's more! By opening a Gmail
account, you also get access to Google Talk, Google's instant messaging
service:

http://www.google.com/talk/

Google Talk offers:
- Web-based chat that you can use anywhere, without a download
- A contact list that's synchronized with your Gmail account
- Free, high quality PC-to-PC voice calls when you download the Google Talk
  client

We're working hard to add new features and make improvements, so we might also
ask for your comments and suggestions periodically. We appreciate your help in
making our products even better!

Thanks,
The Google Team

To learn more about Gmail and Google Talk, visit:
http://mail.google.com/mail/help/about.html
http://www.google.com/talk/about.html

(If clicking the URLs in this message does not work, copy and paste them into
the address bar of your browser).

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



php-general@lists.php.net

2010-06-05 Thread Brandon Rampersad
Those are POST parameters and not GET.

On Fri, Jun 4, 2010 at 10:55 AM, Paul M Foster wrote:

> On Fri, Jun 04, 2010 at 06:54:34AM -0700, Michael Calkins wrote:
>
> >
> > I would google this but I have no idea what this method is or how it
> works.
> > app.php?ph=cus&id=4
> > Can some tell me what this either called or how it works?Can I get a
> tutorial for it please?
>
> This is standard HTTP/HTML terminology, not unique to PHP. What is means
> is that the script being executed (app.php) has been supplied two
> parameters: "ph" and "id".
>
> app.php is a script that can perform various functions, depending on the
> parameters passed to it. For example, app.php may display a record from
> a database. And in this case, app.php may be tasked to display a
> customer record, and the customer record it should display is the one
> where the customer number is 4.
>
> Syntax-wise, after the name of the script (app.php), are whatever
> parameters, if any, the script requires. The first question mark begins
> the list of parameters. Each parameter normally will be in the form
>
> parameter=value
>
> In between each of these parameter/value pairs, you will find an
> ampersand (&). So in this case, you have two parameters being passed.
> The first is "ph", and its value is "cus". The second is "id" and its
> value is "4". What these parameters mean exactly to the script depends
> on the script. There's no universal guide for parameters, what they're
> called or what their values can be. You'd have to look at the script
> itself to see what the parameters make the script do.
>
> In PHP, if you want to use these parameters, you would query the
> parameters this way:
>
> $page_type = $_GET['ph'];
> $which_item = $_GET['id'];
>
> If executed this way, you would find that $page_type has a value of
> 'cus', and $which_item = '4'.
>
> You might have code inside app.php which would look like the following:
>
> $type = $_GET['ph'];
> $id = $_GET['id'];
>
> if ($type == 'cus')
>show_customer_page($id);
>
> Hope that helps.
>
> Paul
>
> --
> Paul M. Foster
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
A Brandon_R Production


Re: [PHP] Credit Card encryption

2010-06-01 Thread Brandon Rampersad
I store CC # in plain text on my custom ecommerse website script so i can
compare it with others. That way it's easier to convert to different hashes
when i decide to integrate an encryption system. So far i havent had any
problems.

On Tue, Jun 1, 2010 at 11:15 AM, Paul M Foster wrote:

> On Tue, Jun 01, 2010 at 10:42:11AM -0400, tedd wrote:
>
> > At 9:24 PM -0400 5/31/10, Paul M Foster wrote:
> >> On Mon, May 31, 2010 at 05:06:23PM -0400, tedd wrote:
> >>
> >>>  At 12:36 PM -0400 5/31/10, I wrote:
>   That's Okay, but I'm simply telling you what I KNOW to be true. You
>   may either accept what I have to say, or reject it, but to reply
>   that what I say is "Not true" is somewhat offensive and
>   confrontational. I hope you didn't mean it that way. :-)
> >>>
> >>>  My apologies for taking what you said as I did and my reply -- it was
> >>>  wrong of me. I am sure you didn't mean anything offensive.
> >>
> >> You are correct. I meant no offense. In turn, when I read your post, it
> >> appeared that you were making a blanket statement applicable under all
> >> conditions, to which I objected. However, reading back over it, you did
> >> insert qualifiers.
> >>
> >> Paul
> >
> > Okay, let's not get a room over this.  :-)
>
> Yes, dear. ;-}
>
> Paul
>
> --
> Paul M. Foster
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
A Brandon_R Production


[PHP] Brandon Rampersad wants to chat

2010-05-19 Thread Brandon Rampersad
---

Brandon Rampersad wants to stay in better touch using some of Google's
coolest new
products.

If you already have Gmail or Google Talk, visit:
http://mail.google.com/mail/b-b89a7a894d-04fb7fdbad-NeHRsydO6kBsIkVOT8hXbjPA1ZU
You'll need to click this link to be able to chat with Brandon Rampersad.

To get Gmail - a free email account from Google with over 2,800 megabytes of
storage - and chat with Brandon Rampersad, visit:
http://mail.google.com/mail/a-b89a7a894d-04fb7fdbad-NeHRsydO6kBsIkVOT8hXbjPA1ZU

Gmail offers:
- Instant messaging right inside Gmail
- Powerful spam protection
- Built-in search for finding your messages and a helpful way of organizing
  emails into "conversations"
- No pop-up ads or untargeted banners - just text ads and related information
  that are relevant to the content of your messages

All this, and its yours for free. But wait, there's more! By opening a Gmail
account, you also get access to Google Talk, Google's instant messaging
service:

http://www.google.com/talk/

Google Talk offers:
- Web-based chat that you can use anywhere, without a download
- A contact list that's synchronized with your Gmail account
- Free, high quality PC-to-PC voice calls when you download the Google Talk
  client

We're working hard to add new features and make improvements, so we might also
ask for your comments and suggestions periodically. We appreciate your help in
making our products even better!

Thanks,
The Google Team

To learn more about Gmail and Google Talk, visit:
http://mail.google.com/mail/help/about.html
http://www.google.com/talk/about.html

(If clicking the URLs in this message does not work, copy and paste them into
the address bar of your browser).

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



[PHP] Brandon Rampersad has invited you to open a Google mail account

2010-05-14 Thread Brandon Rampersad
I've been using Gmail and thought you might like to try it out. Here's
an invitation to create an account.

-------

Brandon Rampersad has invited you to open a free Gmail account.

To accept this invitation and register for your account, visit
http://mail.google.com/mail/a-b89a7a894d-3cf58aeb75-vzb_uAYWXu5ptZeOeU3BqjIlb54

Once you create your account, Brandon Rampersad will be notified with
your new email address so you can stay in touch with Gmail!

If you haven't already heard about Gmail, it's a new search-based webmail
service that offers:

- Over 2,700 megabytes (two gigabytes) of free storage
- Built-in Google search that instantly finds any message you want
- Automatic arrangement of messages and related replies into
  "conversations"
- Powerful spam protection using innovative Google technology
- No large, annoying ads--just small text ads and related pages that are
  relevant to the content of your messages

To learn more about Gmail before registering, visit:
http://mail.google.com/mail/help/benefits.html

And, to see how easy it can be to switch to a new email service, check
out our new switch guide: http://mail.google.com/mail/help/switch/

We're still working every day to improve Gmail, so we might ask for your
comments and suggestions periodically.  We hope you'll like Gmail.  We
do.  And, it's only going to get better.

Thanks,

The Gmail Team

(If clicking the URLs in this message does not work, copy and paste them
into the address bar of your browser).

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



[PHP] Zend Framework Ebook

2010-05-14 Thread Brandon Rampersad
Hello, does anyone have any zend framework 1.10 ebook recomendations.

-- 
A Brandon_R Production


Re: [PHP] Any One See where this is going wrong?

2010-05-01 Thread Brandon Rampersad
yeah, try using the PDO instead

On Sat, May 1, 2010 at 9:14 PM, Adam Richardson wrote:

> On Sat, May 1, 2010 at 6:54 PM, Gary  wrote:
>
> >
> > "Adam Richardson"  wrote in message
> > news:aanlktinqixxb9oipu4op2xztrze_vwpbymaywziwb...@mail.gmail.com...
> > > >
> > >>  $sqlStatements = "INSERT INTO guns (manufacturer, type, model,
> caliber,
> > >>
> > > condition, price, description, image_file_name, available) VALUES
> > >
> > > ('$manufacturer',
> > >> '$type',
> > >>
> >
> '$model','$caliber','$condition','$price','$description','$image_file_name','$available');
> > >
> > > INSERT INTO images(id, image_file) VALUES ('', '$image_file')";
> > >
> > >
> > > Gary, the second insert has what appears to be a troublesome bit of
> code:
> > >
> > > VALUES ('', '$image_file')";
> > >
> > > Shouldn't it read:
> > >
> > > INSERT INTO images(image_file) VALUES ('$image_file')";
> > >
> > > That's assuming you have id set to auto-increment, so no id in the
> first
> > > or
> > > second set of parentheses.  Additionally, the ", before the $image_file
> > > var
> > > would cause issues, too.
> > >
> > > Adam
> > > --
> > > Nephtali:  PHP web framework that functions beautifully
> > > http://nephtaliproject.com
> > >
> > >
> > >
> > > __ Information from ESET Smart Security, version of virus
> > > signature database 5078 (20100501) __
> > >
> > > The message was checked by ESET Smart Security.
> > >
> > > http://www.eset.com
> > >
> > >
> >
> > Adam
> >
> > The second INSERT is part of a multi_query, and yes there is a
> > auto-increment field in front named id,  it is the foreign key that links
> > the tables.
> >
> > I had removed, and just tried again, but the same result.
> >
> > I have tried it so many ways my fingers and eyes are about to bleed. It
> > makes not sense how it works in one but not the other.
> >
> > I cant see to get the error called out.
> >
> > Thanks again.
> >
> > Gary
> >
> >
> >
> >
> > __ Information from ESET Smart Security, version of virus
> signature
> > database 5078 (20100501) __
> >
> > The message was checked by ESET Smart Security.
> >
> > http://www.eset.com
> >
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> And you also removed the double quote and the comma next to it (sorry, just
> making sure?)  That is to say, you copied the line of code I sent?
>
> $sqlStatements = "INSERT INTO guns( *id,*manufacturer, type, model, //
> *id,*should be removed
> caliber, condition, price, description, image_file_name,submitted
> ,available) VALUES ('*',*'$manufacturer', '$type', '$model', '$caliber',
>   // the *",* combo should be removed
> '$condition', '$price', '$description','$image_file_name', ' ',
> '$available');
>
> INSERT INTO images (*id,* image_file) VALUES('','$image_file')";
>  //
> the *id,* should be removed AND the *",* combo should be removed
>
> Also, have you tried directly echoing out the error (e.g., *echo
> mysql_error();*  if it's mysql you're using, or the comparable method in
> the
> library you're using.)
>
> If that didn't work, I'd break up the multi-query into 2 separate queries
> to
> better troubleshoot the issue.  I like using PDO and setting it up so it
> throws exceptions when something goes wrong (additionally, I like using the
> prepared statements, too.)  Have you been trying that?
>
> I'm still hopeful you'll get this figured out before there's any blood-loss
> ;)
>
> Feel free to send back the new code after the edits if you still have
> issues.
>
> Adam
>
> --
> Nephtali:  PHP web framework that functions beautifully
> http://nephtaliproject.com
>



-- 
A Brandon_R Production


[PHP] Admin Interface

2010-04-29 Thread Brandon Rampersad
What guide/ebook/tutorial/article that would explain best-practices and
best-interfaces for admin/backend panels would you recommend?. I already
know how to build them, now i just need to narrow my  techniques to the best
ones by reading best practices and implementations :)

Thank You Buds
Brandon_R

-- 
A Brandon_R Production


Re: [PHP] Contact form....

2010-04-26 Thread Brandon Rampersad
Ashley thank you for catching that, i caught it but then i saw your reply
further down.

On Mon, Apr 26, 2010 at 5:11 PM, Watson Blair wrote:

> ya, i'm working on a walk around now, i just wanted to get the function up
> and running in it's most basic before i started supping it up, as it were.
> i
> was thinking about using a switch and assigning each of my radio buttons a
> value from 1 to 3...
>
> On Mon, Apr 26, 2010 at 4:35 PM, Benjamin Hawkes-Lewis <
> bhawkesle...@googlemail.com> wrote:
>
> > [off-list]
> >
> > On Mon, Apr 26, 2010 at 8:16 PM, Watson Blair 
> > wrote:
> > > the file send.php is:
> > >
> > >  > >
> > > $subject =$_POST"subject";
> > >
> > > $message=$_POST"message";
> > >
> > > $name=$_POST"name";
> > >
> > > $from=$_POST"from"
> > >
> > > $mail_from=$_POST"from";
> > >
> > > $to =$_POST"to";
> > >
> > > $header = "From: {$name} < {$from} >";
> > >
> > > $send_contact=mail($to,$subject,$message, $header);
> > >
> > > if($send_contact){
> > > echo "Thank you for Contacting Us!";
> > > }
> > > else {
> > > echo "An error occurred while sending your message, review your
> > information
> > > and please try again.";
> > > }
> > > ?>
> >
> > Please note that code does not sanitize your inputs and would
> > therefore be vulnerable to email header injection:
> >
> > http://www.nyphp.org/PHundamentals/8_Preventing-Email-Header-Injection
> >
> > --
> > Benjamin Hawkes-Lewis
> >
>



-- 
A Brandon_R Production


[PHP] Admin Panel Ebook

2010-04-26 Thread Brandon Rampersad
Hello Guys,

I've bought a couple ebooks, especially from orielly, on PHP development and
they are mostly dealing with front end stuff about user interface and PHP
development. Could anyone refer me an ebook on back end programming ie Admin
Panel development in PHP especially for social websites hence it should
include user account management, permission system and more Thanks.

-- 
A Brandon_R Production


Re: [PHP] Hello everybody - php newbie from switzerland

2010-04-21 Thread Brandon Rampersad
What's wrong with asking if PHP supports threading?

On Wed, Apr 21, 2010 at 5:33 PM, Michiel Sikma wrote:

> On 21 April 2010 18:02, tedd  wrote:
>
> >
> > Welcome Nick.
> >
> > Do you own a bank?  :-)
> >
> >
> > Cheers,
> >
> > tedd
> >
> >
> C'mon, this is the PHP list, not COBOL :)
>
> But yes, welcome to the list. Frequenting a list is one of the best things
> you can do when learning a language. Don't be afraid to ask should anything
> confuse you.
>
> Michiel
>



-- 
A Brandon_R Production


[PHP] Noloh PHP Framework

2010-03-27 Thread Brandon Rampersad
Hello buds,

Anyone have experience with the noloh php framework (noloh) and knows where
i can download it? Im not sure if its open source or encrypted.

Thanks


Re: [PHP] Re: Epiphany - a salute to APC

2009-07-04 Thread Brandon Johnson
ok thanks for information was just something I was reading about the 
other night. Then I came across this message.

Brandon

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



[PHP] Re: Epiphany - a salute to APC

2009-07-04 Thread Brandon Johnson
you think this is similar to http://www.danga.com/memcached/ or you think 
this method would be faster ? Which do you say would be the greatest 
benfit ?

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



RE: [PHP] strange list behavior when replying to message on list

2008-03-22 Thread Brandon Orther
I just signed back up to the list recently, but it was like this 5 years ago
when I was still on it.  I have always wondered why they didn't have that.
It seems like they are pushing people to submit their solutions to the
person with the question.

Kind Regards,
Brandon Orther


-Original Message-
From: Mark Weaver [mailto:[EMAIL PROTECTED] 
Sent: Saturday, March 22, 2008 10:57 AM
To: php-general@lists.php.net
Subject: Re: [PHP] strange list behavior when replying to message on list

Nilesh Govindrajan wrote:
> Greg Bowser wrote:
>> Yeah.  I always forget to reply to all.
>>
>> The problem is with the headers.  Whereas other lists have a reply-to:
>>  in the email headers, this list does not.  It 
>> annoys
>> the hell out of me.
>>

Why in the bloody hell doesn't the list admin simply "add" that reply-to 
header. As far as I know Sendmail adds that auto-magically by default. 
(I'm assuming they're not using Sendmail as the lists' MTA). It sure 
would make life easier wouldn't it? How long has it been this way?

-- 
Mark

"If you have found a very wise man, then you've found a man that at one 
time was an idiot and lived long enough to learn from his own stupidity."
==
Powered by CentOS5 (RHEL5)

-- 
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] best method for relative linking in php

2008-03-22 Thread Brandon Orther
Hello Sudhakar,

I have added #firstError to the end of my script url and then if I have an
error, I add that anchor to the first error on the page.  This way I don't
have to use any javascript to leap the person forward to the first error.

I think this is what you are doing with your first method.  That should be 

Kind Regards,
Brandon Orther

-Original Message-
From: Sudhakar [mailto:[EMAIL PROTECTED] 
Sent: Saturday, March 22, 2008 4:26 AM
To: php-general@lists.php.net
Subject: [PHP] best method for relative linking in php

i have a registration page where a user fills a form and i display an error
message if a validation message needs to be displayed which i have written
in php. everything works fine. the way the form is made presently is there
is a huge amount of information relating to general information about the
form and its terms and conditions which is compulsory. so if i have to
display any validation message the user has to scroll the page from the top
again all the way till they see the validation message.

i have used relative linking as it is done in html, so that the user does
not have to scroll from the top of the page, rather the page stops where i
want it to so the user see the message and does not have to scroll the page.

following are the 2 methods i have used and both of them work fine. however
in method 2 as it is based on javascript and if
javascript is turned off the relative linking will not work and the user
will have to scroll from the top of the page again and i have tested this
myself.

method 1

#indrel" method="POST"
id="test2" name="registrationform" >


 if($error)
 {
 echo $error;
 }

method 2

" method="POST" id="test2"
name="registrationform" >


 if($error)
 {
 echo ("
 
 window.location.href='<a  rel="nofollow" href="http://website.com/filename.php#indrel">http://website.com/filename.php#indrel</a>'
 
 ");

 echo $error;
 }

please comment if method 1 is correct in terms of the syntax of the form tag
if it is correct or not though i know this method is working the way i want
it to, i wanted to confirm before i implement it for my website.

please advice.

thanks.


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



Re: [PHP] Help With Inventory

2007-01-22 Thread Brandon Bearden
What I WANT to see is something like this

DVD ID | TITLE  |   GENRE 1   |   GENRE 2  | GENRE 3  |  ACT  | 
QTY BCK   |HLD  |  INC | OG USR |  OUT DATE  | OUT USR  |  IN DATE  | 
IN USR  CY

GENRE: ACTION - 1 TITLES
20860023  |  Movie name  |  ACTION  | | |  1  |   1  |   0  |   1000  | 
-00-00 00:00:00 | -00-00 00:00:00 |0

GENRE: COMEDY - 2 TITLES
20860023  |  Movie name  |  COMEDY  | | |  1  |   1  |   0  |   1000  | 
-00-00 00:00:00 | -00-00 00:00:00 |0
20860006  |  Movie name  |  COMEDY  | | |  1  |   1  |   0  |   1000  | 
-00-00 00:00:00 | -00-00 00:00:00 |0




What I HAVE RIGHT NOW IS:

DVD ID | TITLE  |   GENRE 1   |   GENRE 2  | GENRE 3  |  ACT  | 
QTY BCK   |HLD  |  INC | OG USR |  OUT DATE  | OUT USR  |  IN DATE  | 
IN USR  CY

20860023  |  Movie name  |  ACTION  | | |  1  |   1  |   0  |   1000  | 
-00-00 00:00:00 | -00-00 00:00:00 |0
20860023  |  Movie name  |  COMEDY  | | |  1  |   1  |   0  |   1000  | 
-00-00 00:00:00 | -00-00 00:00:00 |0
20860006  |  Movie name  |  COMEDY  | | |  1  |   1  |   0  |   1000  | 
-00-00 00:00:00 | -00-00 00:00:00 |0


Thanks for you help :) I appreciate it very much.


"Roman Neuhauser" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
># [EMAIL PROTECTED] / 2007-01-22 22:55:50 -0800:
>> "Jim Lucas" <[EMAIL PROTECTED]> wrote in message
>> news:[EMAIL PROTECTED]
>> > $count = 0;
>> > while ( $row = mysql_fetch_array( $invlist ) ) {
>> >
>> > if ( $count % 1 ) {
>> > $rowColor = '#c1c1c1';
>> > } else {
>> > $rowColor = '';
>> > }
>> >
>> > echo <<> >
>> > 
>> > {$row['dvdId']
>> > {$row['dvdTitle']}
>> > {$row['dvdGenre']}
>> > {$row['dvdGenre2']}
>> > {$row['dvdGenre3']}
>> > {$row['dvdActive']}
>> > {$row['dvdOnHand']}
>> > {$row['backordered']}
>> > {$row['dvdHoldRequests']}
>> > {$row['incomingInverntory']}
>> > {$row['ogUserId']}
>> > {$row['outDate']}
>> > {$row['outUserId']}
>> > {$row['inDate']}
>> > {$row['inUserId']}
>> > {$row['cycles']}
>> > 
>> >
>> > HEREDOC;
>> >
>> > $count++;
>> >
>> > echo '';
>> > }
>> > }
>> >
>
>> I don't understand how the quotient works there. I will sometime.
>> I also don't understand the HEREDOC concept.
>>
>> I wanted colors alternating to allow for a better read.
>
> Ignore the heredoc thing, the "quotient" (remainder after division)
> works just like it worked in your math class, but it should be
>
>if ( $count % 2 ) {
>$rowColor = '#c1c1c1';
>} else {
>$rowColor = '';
>}
>
> Although I'd use
>
>$rowColors = array('', '#c1c1c1');
>...
>$rowColor = $rowColors[$count % 2];
>
>> I still have not solved the problem with listing the genre in its own 
>> row,
>> alone at the beginning of each section of genre (the start of each unique
>> genre which is the ORDER BY in the statement).
>>
>> Thanks for the code. I need to learn how to write more eloquently like 
>> you.
>>
>> If anyone can figure out the a row listing for the genres, that would be
>> s cool.
>
> You want something like this?
>
> genre  | #id | title | #id | title | #id | title
> ---+-+---+-+---+-+
> horror | 123 | Scary Movie 1 | 456 | Scary Movie 2 | ... | 
> comedy | 234 | Funny Movie 1 | 456 | Funny Movie 2 | ... | 
>
>
> -- 
> How many Vietnam vets does it take to screw in a light bulb?
> You don't know, man.  You don't KNOW.
> Cause you weren't THERE. http://bash.org/?255991 

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



Re: [PHP] Help With Inventory

2007-01-22 Thread Brandon Bearden
Thank you for your help. I see what you are doing different. I don't 
understand how the quotient works there. I will sometime. I also don't 
understand the HEREDOC concept.

I wanted colors alternating to allow for a better read.

I still have not solved the problem with listing the genre in its own row, 
alone at the beginning of each section of genre (the start of each unique 
genre which is the ORDER BY in the statement).

Thanks for the code. I need to learn how to write more eloquently like you.

If anyone can figure out the a row listing for the genres, that would be 
s cool.

"Jim Lucas" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> Here is my rendition of your script.  Give it a shot...
>
> Let me know if you have any question about what is going on.
>
> I was curious, what is the point of having the alternating column colors? 
> Was that your intention?
>
> 
> function invlistONE(){
> dbconnect('connect');
> $invlist = mysql_query("SELECT * FROM sp_dvd
> ORDER BY dvdGenre");
>
>
> echo <<
> 
> .dvdDisplay th {
> font-size: 9pt;
> text-align: left;
> }
> .dvdDisplay td {
> font-size: 8pt;
> }
> 
>
>  } else {
> $rowColor = '';
> }
>
> echo <<
> 
> {$row['dvdId']
> {$row['dvdTitle']}
> {$row['dvdGenre']}
> {$row['dvdGenre2']}
> {$row['dvdGenre3']}
> {$row['dvdActive']}
> {$row['dvdOnHand']}
> {$row['backordered']}
> {$row['dvdHoldRequests']}
> {$row['incomingInverntory']}
> {$row['ogUserId']}
> {$row['outDate']}
> {$row['outUserId']}
> {$row['inDate']}
> {$row['inUserId']}
> {$row['cycles']}
> 
>
> HEREDOC;
>
> $count++;
>
> echo '';
> }
> }
>
> ?> 

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



[PHP] Help With Inventory

2007-01-20 Thread Brandon Bearden
Can anyone help me figure out how to solve my inventory listing problem?

I am using php_5 and mysql_5.0 w/apache on fbsd.

I need to figure out a way to make a subtitle for every category (genre)
in the inventory so when I list the entire inventory on a sheet (at
client's request), it is organized by category (genre) and each category
(genre) has a title line above it. So the there is not just one big list
rather a neat list with titles for each category THEN all the rows in that
category etc. I can't figure out the loop to make the titles.

I have them sorted as you can by genre, the list is formatted fine There
are alternating colors on the rows to make it read easier. I just want to
keep from having to make a statement for EACH genre. I will eventually
make the genre list dynamic too, so I need to figure out how to
dynamically generate this inventory list.

This is the output I have now:

DVD ID  TITLE GENRE 1  GENRE 2   GENRE 3ACT QTY
BCK   HLDINC OG USR   OUT DATE   OUT USRIN DATE IN USR
  CY
20860003Movie name action 1  1 0
 1000-00-00 00:00:00  -00-00 00:00:000
20860020Move Name   COMEDY   11   0
  1000  -00-00 00:00:00  -00-00 00:00:00
 0
20860006Movie name COMEDY 1  1 0
 1000-00-00 00:00:00  -00-00 00:00:000


What I WANT to see is:
I will fix the background colors, I just want to see the "GENRE: ACTION -
1 TITLES and GENRE: COMEDY - 2 TITLES"

DVD ID  TITLE GENRE 1  GENRE 2   GENRE 3ACT QTY
BCK   HLDINC OG USR   OUT DATE   OUT USRIN DATE IN USR
  CY

GENRE: ACTION - 1 TITLES
20860003Movie name ACTION 1  1 0
 1000-00-00 00:00:00  -00-00 00:00:000

GENRE: COMEDY - 2 TITLES
20860023Movie name  COMEDY1   1
  0   1000 -00-00 00:00:00-00-00 00:00:00
0
20860006Movie name COMEDY 1  1 0
 1000-00-00 00:00:00  -00-00 00:00:000







This is the code:
1.  function invlistONE(){
2.  dbconnect('connect');
3.  $invlist = mysql_query("SELECT * FROM sp_dvd ORDER BY dvdGenre");
4.
5.
6.  ?>
7.  
10. DVD ID
11. TITLE
12. GENRE 1
13. GENRE 2
14. GENRE 3
15. ACT
16. QTY
17. BCK
18. HLD
19. INC
20. OG USR
21. OUT DATE
22. OUT USR
23. IN DATE
24. IN USR
25. CY
26. 
27. 
28. "); }
56. else { echo ("");}
57.
58. echo ("");
59. echo (" $dvdId ");
60. echo ("$dvdTitle");
61. echo ("$dvdGenre");
62. echo ("$dvdGenre2");
63. echo ("$dvdGenre3");
64. echo ("$active");
65. echo ("$dvdOnHand");
66. echo ("$back");
67. echo ("$hold");
68. echo ("$incoming");
69. echo ("$ogUserId");
70. echo ("$outDate");
71. echo ("$outUserId");
72. echo ("$inDate");
73. echo ("$inUserId");
74. echo ("$cycles");
75. echo ("");
76. echo ("");
77.
78. $count++;
79. if ( $count == 2 ) { $count = 0; }
80. }
81. ?>http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Floored!

2006-02-24 Thread Brandon Enright
On Thu, 2006-02-23 at 23:38 -0700, Ben Miller wrote:
> If anyone has an answer for this, I would be greatly appreciative.
> 
> I was trying to compare two values, the first is the total cost of products
> to be refunded, and the second is the original order total.  To the naked
> eye, they both were coming out as 102.85, yet an if($Refund_Amount >
> $Order_Total) was coming back true, so.
> 
> I ran some tests, and did the following:
> 
>   $Order_Total = sprintf("%01.20f",$Order_Total);
>   $Refund_Amount = sprintf("%01.20f",$Refund_Amount);
> 
> which produced:
> 
>   $Order_Total = 102.84431566
> and   $Refund_Amount = 102.85852651
> 
> so, I figured I would try the following to make sure that the figures in the
> database weren't weird:
> 
>   $Bar = 102.85;
>   $Foo = sprintf("%01.20f",$Bar);
> 
>   echo "\$Foo = $Foo";
> 
> which produced:
> 
>   $Foo = 102.84431566;
> 
> I am completely lost.
> 

This is an oversimplification but basically to represent any decimal in
binary you need to do so as the sum of the reciprocal powers of two.
That is, .5 + .25 + .125 + .0625... an so on.  If you have nice even
numbers like .75 then a few bits will do.  If you don't you need
increasingly smaller terms until you reach the sum.  You need 37 bits
just to represent .85 exactly.  The floating point numbers your are
using only have 32 bits total (and not even all of them are mantissa
bits).


A description of the standard:

http://www.psc.edu/general/software/packages/ieee/ieee.html


An excellent treatise of the subject:

http://docs.sun.com/source/806-3568/ncg_goldberg.html


Brandon

-- 
Brandon Enright
UCSD ACS/Network Operations
[EMAIL PROTECTED]

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



[PHP] Re: Using File to count number of lines

2005-08-04 Thread Brandon Ryan
 Are you running this php code in windows, where a line break is made up of 
a carriage return and a line feed? The file was probably created on 
unix/linux where the line break is just a line feed. If you try to read this 
file in windows, it will think everything is on one line. You either have to 
replace all line feeds with carriage return and then line feed, or read it 
in and parse it. 
 Brandon
 On 8/4/05, Al <[EMAIL PROTECTED]> wrote: 
> 
> Tom Chubb wrote:
> > I'm having a problem with the following code:
> >
> >  > $file = " http://www.mysite.co.uk/mailing_list_database.list";;
> > $lines = count(file($file));
> > echo "$lines ";
> > ?>
> >
> > I'm trying to show the number of subscribers to my visitors from a 
> > text file, but it returns a value of 1 when it should be 5000.
> > I think it's to do with recognising the line break but I don't know
> > how to make it work!?!
> >
> > (I've looked on php.net <http://php.net/> for the file, fopen & count 
> functions and
> > can't find anything, although fopen mentions using the -t mode.
> > Any ideas?
> >
> > Thanks,
> >
> > Tom
> 
> $count= substr_count($file_str, "\n"); 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
>


Re: [PHP] Updating an open page with PHP

2005-06-14 Thread Brandon Ryan
No, not necessarily...
 Javascript actions on the main page, including form submits or timers can 
load a new page in the hidden IFRAME. The new page in the IFRAME could be a 
php page, that generates new javascript code which is then run when the page 
in the IFRAME is loaded. The javascript code on the page in the IFRAME calls 
functions in the code on the main page, or changes values in the data on the 
main page, thus updating the main page without reloading.
 On 6/14/05, abrea <[EMAIL PROTECTED]> wrote: 
> 
> Yes, but then the user would always have to reload the imbedded frame.
> 
> 
> -Original Message-
> From: "Warren Vail" <[EMAIL PROTECTED]>
> To: "'abrea'" <[EMAIL PROTECTED]>, "'PHP General List'"
> 
> Date: Tue, 14 Jun 2005 10:31:29 -0700
> Subject: RE: [PHP] Updating an open page with PHP
> 
> > > Is there a way in PHP to update information on an open web
> > > page (e.g. to say
> > > "Hello, user, I have just logged in"), without the user
> > > having to refresh
> > > the page himself each time?
> >
> > Technically, I don't believe so, but I can think of a way you might be
> > able to fake it. If you have a browser that supports imbedded frames
> >  only the contents of the imbedded frame (a small portion of
> > your visible page) can be used to minimize the portion that needs to be
> > reloaded. If the imbedded frame has no borders, the user will never
> > notice that there is a frame (unless they are asked to click something
> > inside the frame).
> >
> > Note: I know that IE, Netscape, Mozilla and Firefox all support
> > imbedded
> > frames. My experiences with Firefox have been interesting in that even
> > refreshing the entire page appears to cause no flicker if few items are
> > moved in the second rendering (downside in my testing is that firefox
> > appears to leave running processes consuming RAM, at least in my Windoz
> > XP).
> >
> > I did see an implementation where a javascript routine loaded a
> > separate
> > file and because it ran in the browser, it could update pulldown lists
> > and controls without appearing to refresh the page.
> >
> > HTH
> > Warren Vail
> > [EMAIL PROTECTED]
> >
> > --
> > 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] Right syntax for max value??

2005-06-14 Thread Brandon Ryan
I would do $getnewstitle = "SELECT newstitle FROM `news` ORDER BY news_id 
DESC LIMIT 1";
 This sorts the records by news_id and the limit 1 only returns the first 
record.

On 6/14/05, twistednetadmin <[EMAIL PROTECTED]> wrote: 
> 
> I am making a table at my homepage that automatically collects the
> latest news from mysql db.
> I have got it to work at my own server at home, but not at
> www.torewestre.com  (my remote site)
> 
> Local settings:(WinXP Pro) Apache 2.0.54, PHP 5.0.4 and MySQL 4.1.11
> 
> Remote settings:(Unix) Apache 1.3.27, PHP 4.3.4 and MySQL 3.23.54
> 
> This is the query that works on localhost:
> 
> 
> $getnewstitle = "SELECT newstitle FROM `news` WHERE news_id = ( SELECT
> max( news_id ) FROM news ) ";
> 
> What it does:
> 
> collects the newstitle from the field where PRIMARY key(news_id) is
> the highest auto_increment number.
> 
> This works just as excpected on localhost but not on remote.
> 
> Does anybody know the right syntax?
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
>


Re: [PHP] Problem With System Call

2005-05-19 Thread Brandon Ryan
I think what Kim is asking is, on your copy of RedHat Fedora Core 3,
is are the SELinux security features enabled?

On 5/19/05, Michael Stearne <[EMAIL PROTECTED]> wrote:
> No.  It's RedHat Fedora Core 3.
> 
> Michael
> 
> 
> On 5/19/05, Kim Madsen <[EMAIL PROTECTED]> wrote:
> > > -Original Message-
> > > From: Michael Stearne [mailto:[EMAIL PROTECTED]
> > > Sent: Thursday, May 19, 2005 9:10 AM
> >
> > > I am having the strangest problem using system() or exec() or any
> > > variation.  None of them work on the Fedora Core 3 system that was
> > > just loaded.  The PHP is Version 4.3.9 with Apache 2.0.52, the default
> > > installation for Fedora Core 3.  Everything in PHP works as expected
> > > except when trying a system call.  If I run :
> > >
> > >  > > system("/bin/ls /tmp");
> > > ?>
> > >
> > > on my OS X (Apache/1.3.33 (Darwin) PHP/4.3.4) this returns the desired
> > > results, a listing of the tmp directory.  On the Fedora box I get
> > > nothing, a blank page.  There is content in the /tmp directory on the
> > > Fedora box.
> >
> > Are You perhaps running SElinux?
> >
> > --
> > Med venlig hilsen / best regards
> > ComX Networks A/S
> > Kim Madsen
> > Systemudvikler/Systemdeveloper
> >
> > --
> > 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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] regex question

2005-05-16 Thread Brandon Ryan
Try (for example if character was "A") ...

([^A]|^)A([^A]|$)

This matches four cases:
A is at beginning of string and there is another letter after it,
A has a letter before it and a letter after it,
A is at end of string and there is a letter before it,
or A is the only character in the string.

On 5/16/05, Al <[EMAIL PROTECTED]> wrote:
> What pattern can I use to match ONLY single occurrences of a character in a 
> string.
> 
> e.g., "Some text @ and some mo@@re and [EMAIL PROTECTED], etc @@@.
> 
> I only want the two occurrences with a single occurrence of "@".
> 
> @{1} doesn't work; there are 4 matches.
> 
> 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] php works in IE not Firefox?

2005-05-13 Thread Brandon Ryan
It makes no difference what browser you are using... that site seems
to be down even with IE.

On 5/13/05, Jim Moseby <[EMAIL PROTECTED]> wrote:
> I get the same message with firefox and IE:
> 
> "There seems to be a problem with the MySQL server, sorry for the
> inconvenience"
> JM
> 
> > -Original Message-
> > From: Dustin Wish [mailto:[EMAIL PROTECTED]
> > Sent: Friday, May 13, 2005 2:12 PM
> > To: php-general@lists.php.net
> > Subject: [PHP] php works in IE not Firefox?
> >
> >
> > Anyone run across an issue where a php script works in IE and
> > not Firefox?
> > Christianboards.org is a PHP nuke site running on a Enism
> > linux box that is
> > having this issue.
> >
> >
> > ---
> > Outgoing mail is certified Virus Free.
> > Checked by AVG anti-virus system (http://www.grisoft.com).
> > Version: 6.0.859 / Virus Database: 585 - Release Date: 2/14/2005
> >
> >
> 
> --
> 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] base64_encode in URLs

2005-05-11 Thread Brandon Ryan
Joe, this may be a little off topic, but most modern email clients
wont show images in HTML unless the user clicks to show images
manually.  This could fool your automatic counting and email
verification.

On 5/11/05, Joe Harman <[EMAIL PROTECTED]> wrote:
> HA... Thanks for your thoughts...
> 
> I am actually using this for a broadcast email system... I just use a
> PHP image generator to make a 1 x1 gif... the image generator script
> takes a variable for color then I added another one for email address
> to keep stats on who has opened the message
> 
> ex. image_script.php?color=00&[EMAIL PROTECTED]
> 
> but I am using base64_encode to encode the email address and call
> the variable something besides email... I suppose i didn't have to do
> this, but thought it would be a good practice to do it...
> 
> the end result looks something like this :
> image_script.php?color=00&key=jtzOjM6IkpvZSI7czo5OiJsYXN0X2
> 
> also this is embedded in the body of an HTML email... so, i think it's
> pretty safe any how the script just updates the stats and returns a
> 1x1 gif...
> 
> Cheers!
> Joe
> 
> 
> On 5/11/05, Richard Lynch <[EMAIL PROTECTED]> wrote:
> > On Tue, May 10, 2005 8:50 pm, Joe Harman said:
> > > Hey just curious if it's okay to encode variables that are passed in
> > > URLs with base64_encode??? since, I am going to pass a email address
> > > in the URL, I would like to protect the email address from typical
> > > people
> >
> > I dunno if every character that can be output by base64_encode is URL-safe
> > or not, but you could do:  urlencode(base64_encode($email)) and be 100%
> > certain that it is safe, and that the data you want will come through.
> >
> > That said, I don't think base64_encode will offer much protection from
> > humans who want to snag emails, and you presumably aren't listing these
> > URLs somewhere for web-bot harvesters to find...  Though that would fool
> > them, at least in the present.
> >
> > ARAIK, almost *any* obfuscation of email addresses foils the harvest bots.
> >
> > This seems unbelievable, but I liken it to fishing:  If every time you
> > cast a line in the water, you come up with a million fish, how hard will
> > you work to change your bait?
> >
> > That is the current state of affairs in the "arms race" of email
> > harvesting -- The spammers have SO MANY fish "biting" that they simply
> > don't need to bypass obfuscation.
> >
> > Sooner or later, however, that will change, especially if the harvesters
> > ever care about "quality" of their fish.
> >
> > While I'm not running around fixing all my old obfuscation code, I'm
> > pretty much not using email obfuscation on any new sites/code.
> >
> > Instead, I build a FORM that will send the email "blind" to the recipient,
> > and have a "throttle choke" that limits a given IP
> > ($_SERVER['REMOTE_ADDR']) to N emails sent in H hours.
> >
> > Certainly, a script could be written to re-connect and get a new IP, but
> > that in itself would take enough time on the end of the spammer that I
> > doubt they'll want to bother any time soon.
> >
> > And it's all wrapped up in a 'spaminator' function that I can replace with
> > something more robust if I need to.
> >
> > I figure this way, I'm 2 steps ahead in this arms race, so when the bad
> > guys start decoding the obfuscation emails, I'll be ready for 'em.
> >
> > Now if I could just figure out a way to get my OWN email out of their
> > lists so I wasn't getting 10,000 spams per day (literally) I'd be a Happy
> > Camper.
> >
> > --
> > Like Music?
> > http://l-i-e.com/artists.htm
> >
> >
> 
> --
> Joe Harman
> -
> Do not go where the path may lead, go instead where there is no path
> and leave a trail. - Ralph Waldo Emerson
> 
> --
> 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] Carriage Return problem!

2005-04-12 Thread Brandon Ryan
Make sure there are no extra characters (including linefeeds) after the 
closing "?>" in your php source file.
 Brandon Ryan
 On 12 Apr 2005 19:42:17 -, Dipesh Khakhkhar <
[EMAIL PROTECTED]> wrote: 
> 
> Hi,
> 
> I am using php to generate and xml output file from another xml file using 
> xsl.
> 
> The file is getting created properly and the xml instruction element is at 
> 1st line.
> 
> I am using ant to get the output remotely but it is adding one extra line 
> i.e. carriage return. I checked everything in my xsl, tried 
> xsl:strip-space, no indent etc but as i said file is properly created. I 
> have checked my echo's and print statments but there is none.
> 
> If somebody has tried to direct the output of browser through ant (or some 
> other tool) and came across the same situation and tackled it please inform 
> me. Does the php interpreter enters a carriage return by default as i tried 
> to remome the xml contents and print one normal line of output it still gave 
> me carriage return in the first line.
> 
> Any help will be highly appreciated.
> Thanks!
> 
>


RE: [PHP] pdf properties

2005-02-10 Thread Brandon Thompson
No.

> -Original Message-
> From: Jason Motes [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, February 09, 2005 4:14 PM
> To: php-general
> Subject: [PHP] pdf properties
> 
> Hello,
> 
> Is there anyway to retrieve the properties from a pdf file using php?
> 
> When you right click on a pdf file in windows you can see the 
> title of the file and you can change this property there also.
> 
> I wrote a php page that lists all files in a certain 
> directory.  I want to be able show the actual title of the 
> document instead of just the file name.
> 
> I have searched the manual and google, everything that comes 
> up refers to generating pdfs on the fly, not working with an 
> already made pdf.
> 
> 
> Thanks in Advance,
> 
> Jason Motes
> 
> -- 
> 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] Question about php.ini

2005-02-07 Thread Brandon Thompson
 The phpinfo() will display either the directory in which it expects to find
the php.ini file (if the php.ini does not exist) or it will display the full
path, including the filename (if the php.ini DOES exist where expected).

> -Original Message-
> From: Jay Blanchard [mailto:[EMAIL PROTECTED] 
> Sent: Monday, February 07, 2005 12:53 PM
> To: Stephen Wong
> Cc: php-general@lists.php.net
> Subject: RE: [PHP] Question about php.ini
> 
> [snip]
> Yup, I have tried making a copy of it.  I'm just not exactly 
> sure how to test it?  I ran phpinfo() , and it runs even 
> without a php.ini.
> [/snip]
> 
> Change something in the configuation file that you know you 
> can run a test on, like safe mode status, then restart Apache 
> and conduct the test.
> 
> --
> 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] Credit card storing, for processing

2005-02-02 Thread Brandon Thompson
WowI was hoping someone would respond with a little balance to that
reactionary doomsday speech.  Don't get me wrong...those are some very valid
points that need to be considered, but my gosh...

The key-pair idea is very good.  I've done systems in the past for clients
that work in a similar fashion.

There are multiple layers of security with two main aspects: 
1. The technical implemenation and complexity of the system
2. The responsibility/priveledges granted to users/admins

You can come up with the most complex, technical "secret key" solution
around (aspect #1)but if you entrust that secret key to the wrong person
(aspect #2), it's all for nothing.

In the end...it's about common sense.  It's FAR less dangerous to implement
what you are suggesting than it is to simply pay for your dinner with a
credit card.

One thing I agree with Richard wholeheartedly on is his "Hi, I'm about to
perform brain surgery.  Which scalpel should I use?" anology.  If the
technicaly aspects of implementing a system like this escape you...then
please learn how to do it in theory first.  Don't "learn on the job" with
something as precious as your credit rating.

Hope this helps

Brandon

> -Original Message-
> From: Richard Lynch [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, February 02, 2005 1:34 PM
> To: Angelo Zanetti
> Cc: php-general@lists.php.net
> Subject: Re: [PHP] Credit card storing, for processing
> 
> Angelo Zanetti wrote:
> > thanks for the info. With regard to the setup it will be something 
> > more or less like this:
> 
> DON'T DO IT!!!
> 
> > I want to generate my own keypair.  The private key I keep secure, 
> > offline, on the machine that does the admin (charging, 
> refunds etc).  
> > The public
> >
> > key is used on the server to encrypt card details the minute they 
> > arrive on the server (even using SSL, the data will arrive 
> unencrypted 
> > because the web server decrypts it).
> >
> > Encrypted card details are written to file, and moved off 
> the server 
> > overnight by a cron job.
> >
> > On the admin machine, offline, the details get decrypted 
> when needed 
> > to perform transactions, using the private key.
> 
> Who has access to the private key?
> 
> Under what circumstances?
> 
> How are you going to STOP a determined individual from 
> compromising the access to the private key?
> 
> Do you have $50,000 in escrow for *WHEN* (not if, *WHEN*) 
> that key is compromised?
> 
> Are you prepared to put another $100,000 in escrow *after* 
> that time for the next time it *WILL* happen?
> 
> Are you prepared to contact EVERY credit card customer and 
> tell them their credit card security was compromised?
> 
> > The admin box is on ADSL, but behind a firewall with no services or 
> > ports open to the internet.  I.e it can initiate a 
> connection to the 
> > server on the internet, but not the other way around.
> >
> > Does this setup sound secure enough and a solution that can work?
> 
> NO!
> 
> Who has physical access to the admin box?
> 
> How is it locked down?
> 
> When will the audits be conducted?
> 
> By whom?
> 
> You're missing about a ZILLION things here...
> 
> > What kind of encryption should I be using?
> 
> If you have to ask, you shouldn't be doing this:
> 
> "Hi, I'm about to perform brain surgery.  Which scalpel should I use?"
> 
> You are NOT ready to implement the system you have envisioned.
> 
> Let the credit card companies take the risk.  They've got the 
> resources for it.  That's why things are the way they are.
> 
> I *almost* did the same kind of thing you are about to do.  
> Thank [deity] I came to my senses first.
> 
> I cannot stress this enough.
> 
> DON'T DO IT!
> 
> Sorry, dude.  It's just *NOT* a Good Idea.  Deal with it. :-)
> 
> --
> Like Music?
> http://l-i-e.com/artists.htm
> 
> --
> 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] An object oriented database in PHP?

2004-12-21 Thread Brandon Thompson
> symbulos partners wrote:
> > Brandon Thompson wrote:
> > 
> > 
> >> We use Propel for all of our development.
> > 
> > 
> > Where can we find more about it?
> 
> Google is your friend.

http://propel.phpdb.org

It requires PHP 5, plus it requires additional tools like Creole and Phing
(similar to Ant).  The howtos on the propel site are good...I had it up and
running in just a couple hours.

Brandon Thompson
Ocean Street Consulting, Inc.
http://www.oscfl.com

> 
> --
> 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
> 
> 

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



RE: [PHP] An object oriented database in PHP?

2004-12-20 Thread Brandon Thompson
 We use Propel for all of our development.

> -Original Message-
> From: symbulos partners [mailto:[EMAIL PROTECTED] 
> Sent: Monday, December 20, 2004 1:18 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] An object oriented database in PHP?
> 
> Has anybody implemented an object oriented database in PHP yet?
> --
> symbulos partners
> -.-
> symbulos - ethical services for your organisation 
> http://www.symbulos.com
> 
> --
> 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] first letter

2004-12-20 Thread Brandon Thompson
 echo $name{0}; 

See http://us2.php.net/manual/en/function.substr.php for more...

> -Original Message-
> From: Ahmed Abdel-Aliem [mailto:[EMAIL PROTECTED] 
> Sent: Monday, December 20, 2004 1:00 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] first letter
> 
> hi
> if i have for example this variable
> 
> $name = "John";
> 
> how can i echo the first letter only so the result on the 
> browser will be "J"
> 
> can anyone help ?
>  
> 
> 
> --
> Ahmed Abdel-Aliem
> www.ApexScript.com
> 
> --
> 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] var references question

2004-09-19 Thread Brandon Goodin
Greetings,

 

This is a little difficult to explain. So, below is an example I will work
from. Forgive my ignorance here. I am a java developer using php4 and trying
to figure out a particular scenario.

 

In the following example when I run the myscript.php I pass the $myarr into
the addVal function of the MyClass class. The var_dump in the addVal
function appropriately displays all of the elements of the array a,b,c and
d. However, the var_dump that is done in the script immediately following
the addVal method call displays only elements a,b and c with NO d. From what
I can see, php does not retain the same reference to the array object when
it passes it into the function. It appears that it clones the array and
retains only the changes within the scope of the function. In java I am used
to creating an array and passing it into a method which accomplishes
operations against the array. The passed in array is also modified because
it is a reference to the same array object.

 

Is there a way to accomplish this behavior in php 4?

 

For example:

 

 myscript.php 

 

.

 

$myarr = array();

 

$myarr["valuea"]="a";

$myarr["valueb"]="b";

$myarr["valuec"]="c";

 

$myclass = new MyClass();

$myclass->addVal($myarr);

 

var_dump($myarr);

 

.

 

===end 

 

 

 

 myclass.php 

 

class MyClass {

 

function addVal($myarr){

  $myarr["valued"] = "d";

  var_dump($myarr);

}

 

}

===end 

 

 

Thanks,

Brandon

 



Re: [PHP] Save page

2004-05-10 Thread Brandon Holtsclaw
try something like

$handle = fopen ("http://www.pagetoget.com/thispage.html";, "rb");
$contents = "";
do {
$data = fread($handle, 1024);
if (strlen($data) == 0) {
break;
}
$contents .= $data;
} while(true);
fclose ($handle);

then you have all text from the .html page in $contents and you can do a
fwrite on it to a local file, echo it, str_rep etc etc etc

Brandon Holtsclaw
[EMAIL PROTECTED]


- Original Message - 
From: "Mike Mapsnac" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 10, 2004 10:37 AM
Subject: [PHP] Save page


> Hello
>
> I' m writing php script that will request page and save it locally. The
page
> URL will be parameter (example: http://www.pagetoget.com/thispage.html).
How
> php can request such page and save it locally on the file?
>
> Thanks
>
> _
> Stop worrying about overloading your inbox - get MSN Hotmail Extra
Storage!
>
http://join.msn.com/?pgmarket=en-us&page=hotmail/es2&ST=1/go/onm00200362ave/direct/01/
>
> -- 
> 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] @session_start()?

2004-04-30 Thread Brandon Goodin
I noticed this notation in one of the PEAR packages @session_start()? What
is the purpose of the '@' sign?

 

Thanks

Brandon



[PHP] PHP 5 and interfaces

2004-04-25 Thread Brandon Goodin
I am looking to port some java code to PHP. I am looking at interfaces in
PHP 5 and wondering if they support 'interface . extends .'. For example I
have interface C and it extends Interface A and B..

 



 

Thanks,

Brandon



[PHP] Re: http header

2004-04-16 Thread Brandon Holtsclaw
or you could try something like :

window.location.href='<a  href="http://www.slashdot.org">http://www.slashdot.org</a>'

and / or

window.location.href='http://www.slashdot.org'";
?>

Brandon Holtsclaw
[EMAIL PROTECTED]

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



[PHP] How can I upload(copy) a file if the opendir is activated on my ISPs server?

2003-03-21 Thread Brandon Saccone
Hi all,

I am a sort of newbie on php but my ISP has the opendir restrictions
activated and i would like to have a script to be able to upload files using
an online form.

How can I upload(copy) a file if the opendir is activated on my ISPs server?

Thanks

Brandon
[EMAIL PROTECTED]



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



[PHP] open_dir v safe_mode fighting security

2003-03-13 Thread Brandon Saccone
Hi all,

currently i have a linux apache server with php 4.1.2

Right now on a domain "/home/someuser" and have safe_mode enabled and so
this will stop anybody opening any file that is not owned by them, ie will
not allow you to open someone else's html pages, scripts etc. However it
does not stop them to navigate these files ie webadmin.php. The feature of
going back in the tree with ..
Now the rest of the domains have the open_dir restriction turned ON so they
are secure but lack the functionality of the copy function and other
functions.

My question would be how do i set it up so that that the server is secure
but copy functions and other functions work?

Any ideas
Thanks

Brandon Saccone
[EMAIL PROTECTED]



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



RE: [PHP] FileSize and file_exist failing a file that I am sure is there

2002-11-12 Thread Brandon Orther
Hello,
 
Open_basedir is not set in the php.ini  and I can rename the files
without an issue using the rename function.
 
 
Brandon Orther 
WebIntellects Design/Development Manager
[EMAIL PROTECTED] 800-994-6364
www.webintellects.com <http://www.webintellects.com/> 

-Original Message-
From: Ernest E Vogelsinger [mailto:ernest@;vogelsinger.at] 
Sent: Tuesday, November 12, 2002 9:42 AM
To: Brandon Orther
Cc: PHP User Group
Subject: Re: [PHP] FileSize and file_exist failing a file that I am sure
is there
 
At 17:27 12.11.2002, Brandon Orther spoke out and said:
[snip]
>When try to get a file_exist response I get the following error:
> 
>Warning:  stat failed for /home/admin/2002-11-12-Part1.mp3
> (errno=2 - No such file or directory) in
>/home/admin/hsReleaser.php on line 20
> 
>But I am rather sure that the file does exist.  If I open
>/home/admin/2002-11-12-Part1.mp3 it does exist.
[snip] 

Maybe the open_basedir limitation is in effect, and /home/admin is
outside the allowed base directory?



-- 
   >O Ernest E. Vogelsinger 
   (\) ICQ #13394035 
^ http://www.vogelsinger.at/



[PHP] FileSize and file_exist failing a file that I am sure is there

2002-11-12 Thread Brandon Orther
Hello,
 
When try to get a file_exist response I get the following error:
 
Warning:  stat failed for /home/admin/2002-11-12-Part1.mp3
 (errno=2 - No such file or directory) in
/home/admin/hsReleaser.php on line 20
 
But I am rather sure that the file does exist.  If I open
/home/admin/2002-11-12-Part1.mp3 it does exist.
 
Brandon Orther 
WebIntellects Design/Development Manager
[EMAIL PROTECTED] 800-994-6364
www.webintellects.com <http://www.webintellects.com/> 

 



[PHP] " getting changed to \" when pulled from a

2002-11-07 Thread Brandon Orther
Hello,
 
When trying to save data from a form, the quotations (") get change to
(\")
 
Is there a function that will fix this?
 
---- 
Brandon Orther 
WebIntellects Design/Development Manager
[EMAIL PROTECTED] 800-994-6364
www.webintellects.com <http://www.webintellects.com/> 

 



RE: [PHP] ^M at the end of each line when I use php to write file

2002-10-31 Thread Brandon Orther
Hello,

For anyone else that had a problem with ^M use this function:

str_replace("\r", "", $result);

-------- 
Brandon Orther 
WebIntellects Design/Development Manager
[EMAIL PROTECTED] 800-994-6364
www.webintellects.com




-Original Message-
From: 1LT John W. Holmes [mailto:holmes072000@;charter.net] 
Sent: Thursday, October 31, 2002 10:42 AM
To: Brandon Orther; PHP User Group
Subject: Re: [PHP] ^M at the end of each line when I use php to write
file


You're probably writing \r\n instead of just \n. 

---John Holmes...

- Original Message - 
From: "Brandon Orther" <[EMAIL PROTECTED]>
To: "PHP User Group" <[EMAIL PROTECTED]>
Sent: Thursday, October 31, 2002 12:44 PM
Subject: [PHP] ^M at the end of each line when I use php to write file


> Hello,
>  
> Does anyone know a way around all the ^M at the end of each line that 
> my php file writes to on a linux box?
>  
> 
> 
> 
> Brandon Orther
> 
> WebIntellects Design/Development Manager
> 
>  <mailto:brandon@;webintellects.com> [EMAIL PROTECTED] 
> 800-994-6364
> 
>  <http://www.webintellects.com/> www.webintellects.com
> 
> 
> 
>  
> 


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




RE: [PHP] ^M at the end of each line when I use php to write file

2002-10-31 Thread Brandon Orther
The lines that are having a ^M are pulling from a TEXT field of a mysql
database.  The \n I am saving come out great.  So I guess I found that
my issue is that text fields I am pulling.  Is there a way to make the
new line in a text field the same as a \n when pulling from a database?

 
Brandon Orther 
WebIntellects Design/Development Manager
[EMAIL PROTECTED] 800-994-6364
www.webintellects.com




-Original Message-
From: Evan Nemerson [mailto:evan@;coeus-group.com] 
Sent: Thursday, October 31, 2002 10:08 AM
To: Brandon Orther; [EMAIL PROTECTED]
Subject: Re: [PHP] ^M at the end of each line when I use php to write
file


a what does your code look like??? What happens when you

$fp = fopen("temp", a+);
for ( $x=0 ; $x<10 ; $x++ )
fputs($fp, "$x\n");
fclose($fp);

???



On Thursday 31 October 2002 09:44 am, Brandon Orther wrote:
> Hello,
>
> Does anyone know a way around all the ^M at the end of each line that 
> my php file writes to on a linux box?
>
>
> ----
>
> Brandon Orther
>
> WebIntellects Design/Development Manager
>
>  <mailto:brandon@;webintellects.com> [EMAIL PROTECTED] 
> 800-994-6364
>
>  <http://www.webintellects.com/> www.webintellects.com
>
> 

-- 
I contend that we are both atheists. I just believe in one fewer god
than you 
do. When you understand why you dismiss all the other possible gods, you
will 
understand why I dismiss yours.

-Stephen Roberts


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




[PHP] ^M at the end of each line when I use php to write file

2002-10-31 Thread Brandon Orther
Hello,
 
Does anyone know a way around all the ^M at the end of each line that my
php file writes to on a linux box?
 

 

Brandon Orther 

WebIntellects Design/Development Manager

 <mailto:brandon@;webintellects.com> [EMAIL PROTECTED]
800-994-6364

 <http://www.webintellects.com/> www.webintellects.com



 



[PHP] Problems pulling up a certain url with curl

2002-10-10 Thread Brandon Orther

Hello,
 
I am farely familar with the use of curl.  I have used it in the past
and it seems to be working going to test pages such as php.ner and so
on.  When I try to goto
https://members.ev1.net/rsmembers/english/index.asp?pge=ttick it doesn't
return any headers or html at all.  But if you got there in a browser it
shows up just fine.  Does anyone have any idead why it would do this?
 
Thanks,

---- 

Brandon Orther 

WebIntellects Design/Development Manager

 <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]
800-994-6364

 <http://www.webintellects.com/> www.webintellects.com



 



[PHP] Time is off?

2002-09-25 Thread Brandon Orther

Hello,
 
I am trying to figure out why Squirrel Mail is giving the wrong time.  I
did a basic script   and the time is off in that
script too.  I have checked the server time and the server hardware
clock.  They are both on.  Does anyone know a reason that the php time
would be off?  I am thinking maybe a setting in the php.ini or
something?
 
Thanks for any help,
 
Brandon Orther 
WebIntellects Design/Development Manager
[EMAIL PROTECTED] 800-994-6364
www.webintellects.com <http://www.webintellects.com/> 

 



[PHP] Can't Install on Mac OS X

2002-07-13 Thread Brandon Pearcy

Hi Everyone,

In the past I have setup many Mac OS X web servers successfully. Now 
I'm trying to setup another OS X web server, but PHP will not work. 
I'm having massive problems getting PHP to "make", and I'm all out of 
ideas. After I configure PHP (./configure), and try to make it, I get 
these errors:

make[1]: *** [php] Error 1
make: *** [all-recursive] Error 1

I've tried an alternative way of installing from Marc Liyanage's web 
site, http://www.entropy.ch/ which was very easy to follow, but it 
absolutely will not allow me to view any PHP pages through Apache. 
PHP prints out the following error instead:

Warning: Failed opening '/Library/WebServer/Documents/test.php' for 
inclusion (include_path='.:/usr/local/lib/php') in Unknown on line 0

As you can see, the file's name is test.php, but you should know it 
has absolutely NO PHP code in it. It's contents are:



Why don't I work?



Anyone have any ideas?

If anyone is willing, could they download the latest source of PHP 
and try to configure and make it (don't bother make install-ing 
it...) If you have any success with it, let me know.

Thanks in advance!
-- 
--
Brandon Pearcy
   Internet Technician

Bowes Online
--
  phone: 1-780-532-1110 ext. 265
  fax:   1-780-532-2120
  [EMAIL PROTECTED]


[PHP] Help w/ Proximity Search

2002-07-09 Thread Brandon Pearcy

Hello,
   I have a couple of questions with respect to creating a postal / 
zip code proximity search that is remotely accurate. The system I am 
using now is OK for small distances, but is terrible at calculating 
large distances.

   What I have is a database of establishments and their corresponding 
latitudes and longitudes, and I need to have users enter their own 
postal / zip code, and have the system calculate which establishments 
fall into a set range ($range) from their location. Not only does it 
need to find the establishments, it needs to calculate the distances 
(straight line, of course).

   Now, I have dug through the PHP archives, but there is no single 
clear explanation of how to do this, from beginning to end. I will 
start by putting down what I need, and then maybe other people can 
contribute to this and in the end we will have the solution, nice and 
tidy, in one place.

*** NOTE: I know doing this in PHP will be SLOW, but I do not want to 
write a MySQL user-defined function and recompile it and blah, blah, 
blah... (unless someone wants to cover that aspect!!! :D)

   Step 1: Take the postal / zip code that the user entered, and 
search the national postal / zip code database (which I already have) 
and return its corresponding latitude and longitude ($userLat and 
$userLong).

   Step 2: ???

   Step 3: Return the establishments information to the user, complete 
with the distances to them, ordered by smallest distance to largest.



If you can't help me out, maybe you can direct me to some online 
tutorials on this topic!

Thanks in Advance!
-- 
--
Brandon Pearcy
   Internet Technician

Bowes Online
--
  phone: 1-780-532-1110 ext. 265
  fax:   1-780-532-2120
  [EMAIL PROTECTED]

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




[PHP] Postal / Zip Code Proximity Search

2002-07-09 Thread Brandon Pearcy

Hello,
   I have a couple of questions with respect to creating a postal / 
zip code proximity search that is remotely accurate. The system I am 
using now is OK for small distances, but is terrible at calculating 
large distances.

   What I have is a database of establishments and their corresponding 
latitudes and longitudes, and I need to have users enter their own 
postal / zip code, and have the system calculate which establishments 
fall into a set range ($range) from their location. Not only does it 
need to find the establishments, it needs to calculate the distances 
(straight line, of course).

   Now, I have dug through the PHP archives, but there is no single 
clear explanation of how to do this, from beginning to end. I will 
start by putting down what I need, and then maybe other people can 
contribute to this and in the end we will have the solution, nice and 
tidy, in one place.

*** NOTE: I know doing this in PHP will be SLOW, but I do not want to 
write a MySQL user-defined function and recompile it and blah, blah, 
blah... (unless someone wants to cover that aspect!!! :D)

   Step 1: Take the postal / zip code that the user entered, and 
search the national postal / zip code database (which I already have) 
and return its corresponding latitude and longitude ($userLat and 
$userLong).

   Step 2: ???

   Step 3: Return the establishments information to the user, complete 
with the distances to them, ordered by smallest distance to largest.



If you can't help me out, maybe you can direct me to some online 
tutorials on this topic!

Thanks in Advance!
-- 
--
Brandon Pearcy
   Internet Technician

Bowes Online
--
  phone: 1-780-532-1110 ext. 265
  fax:   1-780-532-2120
  [EMAIL PROTECTED]

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




[PHP] Appologies

2002-07-03 Thread Brandon

I've posted to this newsgroup a few times and some of you have replied back
via email.  Recently I had a virus on my machine that sent out a TON of
email to people i've recieved email from - I just wanted to appologize if
you recieved any of this spam.  I now have updated Anti-Virus software so it
shouldn't happen again!

Thanks,
Brandon



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




[PHP] How to use Session Variables

2002-07-01 Thread Brandon

Could anybody point me to a good tutorial/howto on how to make a variable
accessible to all of my PHP pages?  I'm running PHP 4.0.6 with
register_globals set to ON... (I cant change that).  I've tried with the
$HTTP_SESSION_VAR,$_SESSION, and session_register() method but just can't
seem to make it work.  Any help would be appreciated.

Thanks,
Brandon



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




[PHP] Reading a conf file

2002-02-27 Thread Brandon Orther

Does anyone have a good idea of how I can pull the info out of a conf
file setup like this?  Maybe pull it into an array.
 
 
## Conf File ##

domain.websites.com


newsite.worldwideweb.net

 
So I would get the domain.websites.com and newsite.worldwideweb.net
 
 
Brandon Orther 
WebIntellects Design/Development Manager [EMAIL PROTECTED]
800-994-6364
www.webintellects.com

 



[PHP] Reading the value in a cookie

2002-02-20 Thread Brandon Orther

Hello,
 
I know how to set a cookie.  How do I read the value of that cookie the
next time that person returns to my website?
 
 
Brandon Orther 
WebIntellects Design/Development Manager [EMAIL PROTECTED]
800-994-6364
www.webintellects.com

 



[PHP] Using a mysql data base and cookie to log a person in

2002-02-20 Thread Brandon Orther

Hello,
 
I loosely understand how I can have a person login to a system by giving
them a cookie with a certain amount of time with a encrypted code.  And
save that same encrypted code in the database for a certain amount of
time.  I am looking for a tutorial on how to do this so I can wrap my
mind around it a little better.
 
If anyone knows a good tutorial on how to log people into your site
using a userser database please hook me upZ wiT da Inf0z
 
Brandon Orther 
WebIntellects Design/Development Manager [EMAIL PROTECTED]
800-994-6364
www.webintellects.com

 



RE: [PHP] Writing PHP files from inside a PHP file

2002-02-06 Thread Brandon Orther

Use include();  or require();

 
Brandon Orther 
WebIntellects Design/Development Manager [EMAIL PROTECTED]
800-994-6364
www.webintellects.com


-Original Message-
From: Georgie Casey [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, February 06, 2002 3:32 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Writing PHP files from inside a PHP file

I want to extract information from a database table and create a
half-static, half-dynamic PHP page from the info. I want to store the
template for the new page in an external file with tags in the places
where
I want variables to be printed. What;s the best of achieving this??

I tried "fread" but that just printed "" to the
static
page instead of replacing it with the value.

Any suggestions?
--
Regards,
Georgie Casey
[EMAIL PROTECTED]

***
http://www.filmfind.tv
Ireland's Online Film Production Directory
***



-- 
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] Check if var is a domain name

2002-02-05 Thread Brandon Orther

Hello,
 
Does anyone know a function or how I could make a function to check a
variable for being a valid domain name without the "www. <http://www./>
" In fron of it?
 
Ex. $var = "mynewdomain.com"   that would be TRUE
 
Ex2. $var = "www.mynewdomain.com"   that would be FALSE
 
Ex3. $var = "My Great Domain"   that would be FALSE
 
And so on.
 
Does anyone have a function that makes sure there are no illegal
characters and there is a period in the middle of the text?
 
 
---- 
Brandon Orther 
WebIntellects Design/Development Manager
[EMAIL PROTECTED]
800-994-6364
www.webintellects.com

 



[PHP] MySQL

2002-01-17 Thread Brandon Orther

Hello,
 
I am trying to insert data, but it willnot take the #
 
Does anyone know how to escape the # sign in mysql?
 
Thanks
Brandon
 
Sorry if I was a bit Off Tapic



[PHP] MySQL and PHP

2002-01-17 Thread Brandon Orther

Hello,
 
I am trying to use mysql through php.  When I try to run the following
query it does nothing.  I am trying to figure out if it is the query or
php I am having a problem with.  Does anyone see a problem with the
below query? (Note: This is for mysql)
 
QUERY: 
INSERT INTO page_properties
(page_name,open_menu,top_image,title_image,side_images)
VALUES("30daypolicy","comp_info2","top_aboutus","titlebar_aboutus","30da
y");
 
Thanx for your help,
Brandon



[PHP] PHP-Friendly WYSIWYG HTML Editor

2002-01-04 Thread Brandon

G'day!

I'm a full-time university student, and also serve on a part-time basis
(during vacations, holidays, etc.) as the Systems
Administrator/Webmaster/PHP Guru/Computer Trainer for my library back home.
Another work term is coming to an end soon, and in my absence, there will be
no PHP/HTML-savvy staff onsite - just me, several hundred kilometres away.

As the subject header pretty clearly lays out, I'm looking for a WYSIWYG
HTML editor that isn't going to go and h4x0r webpages which contain PHP
source that I've written to automate several tasks they perform. So far,
I've tried the following without success:

- Adobe PageMill. It came free with PageMaker; nice, except it arbitrarily
replaces things like http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] FreeType 2 on windows?

2001-12-26 Thread Brandon Orther

How do I get FreeType 2 installed on my WIndowsXP box?  Anyone know of
web site with a tutorial?
 
Thanks
 
Brandon Orther
WebIntellects Design/Development Manager
[EMAIL PROTECTED] 
800-994-6364
www.webintellects.com
 
 



RE: [PHP] Opening a new window.

2001-12-14 Thread Brandon Orther

I wanted to know how I could have php open a window. Like can I have it
print out some javascript to open a new window?  Instead of someone
having to click a link.

Thanks Brandon

-Original Message-
From: Mark Charette [mailto:[EMAIL PROTECTED]] 
Sent: Friday, December 14, 2001 2:08 PM
To: PHP User Group
Subject: RE: [PHP] Opening a new window.

I would use "target="_blank" in the anchor tag  so it would work just
fine
_without_ javascript ...

Mark C.

-Original Message-
From: Mehmet Kamil ERISEN [mailto:[EMAIL PROTECTED]]

I would use javascript for that.
--- Brandon Orther <[EMAIL PROTECTED]> wrote:
> Does anyone know how I could have php open a new windows
> with the url I
> specify?
>
> Thanx,
> Brandon>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Opening a new window.

2001-12-14 Thread Brandon Orther

Does anyone know how I could have php open a new windows with the url I
specify?
 
Thanx,
Brandon



[PHP] FW: A little O T: <-- Can I make a better looking file box?

2001-12-12 Thread Brandon Orther

Hello,
 
I have been working on a php script and lately have been adding style
sheets and image submit buttons to make it look better.
 
I have now run into the problem that the input type file looks like a
regular form input.  I would like to use an image as the browse button
and a css for the text box.  If I apply a css to the file input it
doesn't look right.
 
Does anyone know another way to make a file input with more options on
looks?  Can I make the browse button an image I make?
 
Thanks for any help
Brandon



Re: [PHP] php & frontpage

2001-11-26 Thread Brandon Lamb

Why are you even using frontpage themes? If you know how to program PHP you
should be above using MS frontpage features... Frontpage is good for a
WYSIWYG editor, but I highly recommend NOT using its proprietary features...

use CSS or something...

Brandon L.

- Original Message -
From: "Tobe Johnson - Johnsons" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, November 26, 2001 2:23 PM
Subject: [PHP] php & frontpage


I am trying to use PHP3.x and Front Page 2000.  I am able to get it to work
o.k. in Frontpage.  However, when I rename my *.htm page to a *.php3 page
and click 'Save', it drops all the theme information when I upload it to my
server.  Is there an easy way to stop this from happening?  I'm not sure if
this is a php issue or a FrontPage issue.

Thanks for any help you can provide.  I saw several references to php and
FrontPage in researching this issue, but didn't come across this specific
thing.

Tobe


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] How do I convert from perl to php? - Reality Check & Taxation

2001-11-21 Thread Brandon Lamb

The point of keeping it easier is what if i want to give my script to a
friend, do you REALLY want to explain to a non-programmer how to add another
if statement or condition when they could simply add the field to the array?

And actually you only have to change the name in 2 places.
1. you define the variable as an input from a form
2. in the required fields array

- Original Message -
From: "George Whiffen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, November 21, 2001 7:28 AM
Subject: Re: [PHP] How do I convert from perl to php? - Reality Check &
Taxation


> So I would have to write a seperate if condition for each form input field
i wanted to require? that doesn't make for a very dynamic script...
>
> > if(!(isset($name) && isset($address) && isset($phone)) {
> > echo "You left one empty.";
> > }

Reality Check:  We write code to solve real world problems!

The parts of our code which are essential to the describe the real world
problem we want solved are
essential.  All the rest of our code is an unfortunate "tax" on the rest of
the world.  The code can
be as complex, dynamic, interesting or clever as it likes, it's still tax!
"Very dynamic script"s
have to be JUSTIFIED, they are not, repeat not, intrinsically good!

In this case, the essential elements are the names of the fields required
and the message to be sent
if they are not present i.e. the following 38 characters

"name address phone You left one empty."

Rasmus code consists of 92 characters i.e. 44 extra characters or around
110% tax.  Does that sound
a lot?  Your original perl had 192 characters i.e. over 400% tax.

What about maintainability/reusability?  Lets look at the tax element of
some likely changes:

1. Change in the name of one of the required fields e.g. name should now be
lastname
Rasmus : 0% TAX:  (You change "name" to "lastname" once)
Perl : 200% TAX:  (You change "name" to "lastname" in 3 places)

2. Remove one of the fields from the required list
Rasmus : 12 characters TAX (You have to remove "&& isset($) " as well as the
field name itself)
Perl : 13 characters + 200% TAX (You must remove "$ = param($);\n" and the
field name 3 times)

3. Add a new field
As per 2. above.

4. Modify the conditions for the error message e.g. change to name and
either address or phone
required
Rasmus : 4 characters TAX (change && to "or" and add two brackets) i.e.
if(!(isset($name) && (isset($address) or isset($phone)) {
Perl : Rewrite requiredunknown cost!

Well, I hope that resolves the question of which is the more world-friendly
code (i.e. more "tax"
efficient).

Personally, and all views on simplicity, elegance and beauty of code are
subjective, I also find
Rasums php version much simpler and easier to understand.  It involves far
fewer commands and is
therefore much more accessible to the novice programmer.  It has much less
extraneous structure and
is clearly focussed on the task in hand.  It can very easily be extended and
modified to provide
richer functionality.  What more do we want? (Well personally, I'd rather he
used "and" instead of
"&&" and "not" instead of "!" and put the separate conditions on separate
lines and generally had
more white space ;).

George

P.S.  Is this a characteristic example of the difference beteeen Perl and
PHP or an extreme
example?  Is Perl really so "geeky" in style and application?  Or am I just
too stupid, stubborn,
ignorant to see that Perl is better than php?


[EMAIL PROTECTED] wrote:
>
> So I would have to write a seperate if condition for each form input field
i wanted to require? that doesn't make for a very dynamic script...
>
> > if(!(isset($name) && isset($address) && isset($phone)) {
> > echo "You left one empty.";
> > }
> >
> > On Tue, 20 Nov 2001 [EMAIL PROTECTED] wrote:
> >
> > > I am a perl user trying to convert to php
> > >
> > > how would i turn this perl into php?
> > >
> > > use CGI;
> > >
> > > $name = param(name);
> > > $address = param(address);
> > > $phone = param(phone);
> > >
> > > @required = qw( name address phone );
> > >
> > > foreach $key($required)
> > > {
> > >  if (!$$key) { &out("You left one empty."); }



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Conversion number two?

2001-11-20 Thread Brandon Lamb

Here is the php version
$required = array('name','address','phone');

Here is the perl version
@required = qw( name address phone );


So is there an easy way in perl for us lazy people so i dont have to use
commas and enter every variable name in single quotes?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: Re: How do I convert from perl to php?

2001-11-20 Thread Brandon Lamb

What about this?

  $required = array('name','address','phone');
  while ( list($key, $value) = each ($required) )  {
if ( empty($value) ) {
  print("Sorry, you left $key empty.");
}
  }

- Original Message - 
From: "Philip Hallstrom" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, November 20, 2001 2:22 PM
Subject: [PHP] Re: Re: How do I convert from perl to php?


You could do something like this... there are lots of ways to validate
your data...

while( list($key, $value) = each($HTTP_POST_VARS) )  {
if( empty($value) )  {
print("Sorry, you left $key empty.");
}
}




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: Re: How do I convert from perl to php?

2001-11-20 Thread Brandon Lamb

Now this looks like what I would want...

brandon

- Original Message -
From: "Philip Hallstrom" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, November 20, 2001 2:22 PM
Subject: [PHP] Re: Re: How do I convert from perl to php?


You could do something like this... there are lots of ways to validate
your data...

while( list($key, $value) = each($HTTP_POST_VARS) )  {
if( empty($value) )  {
print("Sorry, you left $key empty.");
}
}

This is assuming the form method is POST.  If it's GET, switch POST with
GET above.

-philip

On Tue, 20 Nov 2001 [EMAIL PROTECTED] wrote:

> So I would have to write a seperate if condition for each form input field
i wanted to require? that doesn't make for a very dynamic script...
>
> > if(!(isset($name) && isset($address) && isset($phone)) {
> > echo "You left one empty.";
> > }
> >
> > On Tue, 20 Nov 2001 [EMAIL PROTECTED] wrote:
> >
> > > I am a perl user trying to convert to php
> > >
> > > how would i turn this perl into php?
> > >
> > > use CGI;
> > >
> > > $name = param(name);
> > > $address = param(address);
> > > $phone = param(phone);
> > >
> > > @required = qw( name address phone );
> > >
> > > foreach $key($required)
> > > {
> > >  if (!$$key) { &out("You left one empty."); }
> > > }
> > >
> > > ??
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] The url of the last site?

2001-11-15 Thread Brandon Orther

Hello,
 
I am trying to have a script that process a form and then sends the
person back to the form they were on if there are errors.
 
Does anyone know how I can get the url of the form that someone submit
to the script from?
 
Thanks
Brandon



[PHP] mail() function

2001-11-14 Thread Brandon Orther

Hello,
 
I have been mssing with the mail function for a day now.  When I send a
e-mail it always adds the server name to the end of whatever I put the
e-mail from in the header.
 
Example:
 
$mailheaders = "From: \"Do Not Reply\"\r\nReply-To: Do Not Reply@Do Not
Reply\n";
 
If I use the above headers it says from "Do Not [EMAIL PROTECTED]"
 
Does anyone know how to make it just say "Do Not Reply"?
 
Thanks
Brandon



RE: [PHP] using mail

2001-11-12 Thread Brandon Orther

YES I DID READ THE F...in MANUAL

-Original Message-
From: Kurt Lieber [mailto:[EMAIL PROTECTED]] 
Sent: Monday, November 12, 2001 2:56 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] using mail

Did you RTFM?

http://www.php.net/manual/en/function.mail.php

Just create a variable and input it as an extra header.

$from = "from: [EMAIL PROTECTED]\r\n" ;

mail($to,$subject,$message,$from);

On Monday 12 November 2001 02:41 pm, you wrote:
> Hello,
>
> I am using the mail() function right now to send e-mails.  Is there a
> way I can dynamically change where it says the e-mail is from?
>
> Thanks
> Brandon

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] using mail

2001-11-12 Thread Brandon Orther

Hello,
 
I am using the mail() function right now to send e-mails.  Is there a
way I can dynamically change where it says the e-mail is from?
 
Thanks
Brandon



[PHP] Extensions problem

2001-11-01 Thread Brandon Orther

Hello,
 
I have mssql extensions working with the .dll in the extensions
directory of my PHP4 folder.
 
I am trying to get curl to work but when I try to run php it says that
php_curl.dll was not found,  But it is in the same dir as the mssql and
mssql is working great.
 
 
Any IDEAS?
 
Thanks
Brandon



[PHP] MSSQL functions

2001-10-31 Thread Brandon Orther

Hello,
 
Since I am not able to get msssql functions running.  Can someone please
give me instructions on exactly what I need to do to get the functions
werking?
 
Thanks Brandon



[PHP] WindowsXP, PHP4 and MS SQL functions

2001-10-31 Thread Brandon Orther

Hello,
 
I am trying to get php4 to use mssql function under WindowsXP.  I don't
know if this is a problem or not. 
I uncommented the extensions line in the php.ini file that says:
extension=php_mssql.dll
 
But when I try to use mssql_connect it says call to undifiened function.
Does anyone know anything I should try to resolve this?>
 
Thanks
Brandon



[PHP] Searching for a word in a string

2001-10-19 Thread Brandon

Hello,

How can I search for a certain word in a string?

Thanks
Brandon


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] FW: PHP isn't reading the php.ini

2001-09-24 Thread Brandon Orther

Hello,

I had a computer running a MSSQL server and apache with PHP on it for
development.  I got hit by the nimda Virus and have had to start all over.
I am trying to get MSSQL support with PHP but I am having the following
problems.  Thanks for any help ahead of time.

When I uncomment the like for php_mssql.dll it doesn't seem to do anything.
It just says call to undifiened function.  I removed the php.ini from the
winnt folder and still php runs.  I am wondering if php is even reading the
php.ini.  Is it possible for it to run with out it?

If you have any idea what could be happing please pet me know.

Thanks
Brandon



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


[PHP] PHP isn't reading the php.ini

2001-09-24 Thread Brandon Orther

Hello,
 
I had a computer running a MSSQL server and apache with PHP on it for
development.  I got hit by the nimda Virus and have had to start all over.
I am trying to get MSSQL support with PHP but I am having the following
problems.  Thanks for any help ahead of time.
 
When I uncomment the like for php_mssql.dll it doesn't seem to do anything.
It just says call to undifiened function.  I removed the php.ini from the
winnt folder and still php runs.  I am wondering if php is even reading the
php.ini.  Is it possible for it to run with out it?
 
If you have any idea what could be happing please pet me know.
 
Thanks
Brandon



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


[PHP] Get the beginning array number

2001-09-17 Thread Brandon Orther

Hello,
 
I have an array sent to my script that starts at different numbers each
time.  Here is an example
 
 
$array[5] through $array[23]  will have values but [0]-[4] will not.
 
Is there a way for me to find the first element of an array with a value?
 
Thank you,


Brandon Orther
WebIntellects Design/Development Manager
[EMAIL PROTECTED]
800-994-6364
www.webintellects.com
  
 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


RE: [PHP] Beginner's books?

2001-09-13 Thread Brandon Orther

PHP Fast & Easy :  http://www.thickbook.com/books/index.phtml

-Original Message-
From: LRW [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, September 13, 2001 8:54 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Beginner's books?

OK, here's a question that should just make me look like a newbie and
not an
idiot:

Anyone have any recommendations of good books for PHP beginners?
Something that gives the basics in clear detail and as few errors in the
examples as possible? =)

I've found bad errors in Sam's "Teach Yourself ASP" for example.

Thanks!
Liam



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Rounding a number up

2001-09-10 Thread Brandon Orther

Is there a way to round a number to the next whole number?
 
Example: 
 
Before: 1.86758
 
After:  2
 
Thank you,
 
 



[PHP] Convert a string so it is valid for a sql query

2001-09-10 Thread Brandon Orther

Hello,
 
Is there a function to convert a string so it is a valid string of text
for a SQL query?  AN example would be a string of text that has ' in it
would be converted to \'
 
Thank you,

--------
Brandon Orther
WebIntellects Design/Development Manager
[EMAIL PROTECTED]
800-994-6364
www.webintellects.com
  
 



RE: [PHP] URLencode

2001-09-07 Thread Brandon Orther

I just realized that on the server I am trying to run this on, URLEncode
is working like rawurlencode.   Does anyone have any idea why this might
be happening? 

Thank you,


Brandon Orther
WebIntellects Design/Development Manager
[EMAIL PROTECTED]
800-994-6364
www.webintellects.com
  

-Original Message-
From: Brandon Orther [mailto:[EMAIL PROTECTED]] 
Sent: Friday, September 07, 2001 2:41 PM
To: PHP User Group
Subject: [PHP] URLencode

Hello,
 
I am working on a script and using urlencode but not getting the results
I want.  Does anyone know how to convert the spaces of a sting of text
in "+" instead of %20?
 
Thanks


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] URLencode

2001-09-07 Thread Brandon Orther

Hello,
 
I am working on a script and using urlencode but not getting the results
I want.  Does anyone know how to convert the spaces of a sting of text
in "+" instead of %20?
 
Thanks



[PHP] Looking for PHP programmer in San Diego Area

2001-09-06 Thread Brandon Orther

Hello,
 
I am currently working on a full fledge PHP project for my current
company.  We are looking for 1 to 2 more PHP programmers to finish up
this project for the next several months.  If you would like more
information please respond to my e-mail address and not the User Group
Thank you,


Brandon Orther
WebIntellects Design/Development Manager
[EMAIL PROTECTED]
800-994-6364
www.webintellects.com
  
 



[PHP] If statement within a variable?

2001-08-30 Thread Brandon Orther

Hello,
 
Is there a way to put an if statement in a variable?  
 
For example:
 
$var = "Hello".IF($var2 = 1) { ."Mr. Bean". } else { ."New Comer". }."
To The Coffee House.";
Thank you,
Brandon Orther 



[PHP] Check if a word is in my string.

2001-08-28 Thread Brandon Orther

Hello,
 
I have a variable with a string in it.  I want to check if in that
string a certain word is in it.  Example
 
$var = "This is a good sentence";
 
$check = look("good", $var);
 
 
and $check would equal 1 since "good" is in that string
 
 
 
 
does anyone know how to do this?



[PHP] Using PHP to move a row of information to another table

2001-08-27 Thread Brandon Orther

Hello,
 
In MSSQL:
 
I want to take one row of information from one table and put it into
another row.  Does anyone know of an easy way?  Or do I have to go
column by column copying each column into the new table?
 
 
Thank you,


Brandon Orther
WebIntellects Design/Development Manager
[EMAIL PROTECTED]
800-994-6364
www.webintellects.com
  
 



  1   2   3   >