[PHP] Fwd: FACEBOOK MALWARE BOTNET

2010-03-23 Thread Allen McCabe
*Importance:* High All: If you are a Facebook user, you may have recently received an email with the subject: *Facebook Password Reset Confirmation Customer Support. **The *address of the sender is spoofed to display supp...@facebook.com *THIS IS MALWARE BOTNET – DO NOT OPEN THIS MESSAGE!

Re: [PHP] Appalling Dreamweaver performance

2010-01-31 Thread Allen McCabe
Notepad++ also has session saving capabilities. This means you can save which files you're working on, close Notepad++, and reload those files at a later date. It's cool. On Sun, Jan 31, 2010 at 4:51 PM, Ashley Sheridan wrote: > On Mon, 2010-02-01 at 11:28 +1100, clanc...@cybec.com.au wrote: > >

Re: [PHP] Reports generator

2010-01-28 Thread Allen McCabe
can take care of any caching of finished reports. > Your superclass is responsible for building up the "frame" of the > webpage that holds the reports. > If two or more plugins need (almost) the same data, consider building > a datastore class, that sits "below" all th

Re: [PHP] Reports generator

2010-01-27 Thread Allen McCabe
I actually started on a report class yesterday, and I have a few questions, but first some details: - Reports will be on user orders (ticket reservations). - Need to be able to build a large variety of reports based on existing data + Orders by a specific user + Orders for a specific product (ev

Re: [PHP] Open Source CMS

2010-01-20 Thread Allen McCabe
o very simple things, or for professional PHP programmers who want to do pretty much anything. Cheers :) Allen On Wed, Jan 20, 2010 at 8:14 PM, Robert Cummings wrote: > Allen McCabe wrote: > >> I've not had much experience with CMS's, however Drupal seems pretty >> feature

Re: [PHP] Open Source CMS

2010-01-20 Thread Allen McCabe
For a work in progress, view http://www.mwclans.com/new_index.php The login fields are a 'component' I include in the header. The links are generated from the 'links' table; the primary_navigation links are a class by the same name, and the 'footer_navigation' are also a different category. All li

Re: [PHP] Open Source CMS

2010-01-20 Thread Allen McCabe
I've not had much experience with CMS's, however Drupal seems pretty featured, with the steep-learning curve; it's not very user friendly. I'm working on my own CMS which is more generic, so that it can be used with any kind of website (basically). I suggest you do the same; have a page class with

Re: [PHP] "Call to undefined method" on class property!? - [CLOSED]

2010-01-07 Thread Allen McCabe
d (using mysql_num_rows()) and I have gotten past this error, however I am still having a major problem with what I'm trying to accomplish. I'll post more later tonight when I get home from work... Thanks for your help Thijs adn Darren On Thu, Jan 7, 2010 at 3:49 AM, Thijs Lensselink wrote: &g

[PHP] "Call to undefined method" on class property!?

2010-01-07 Thread Allen McCabe
I have a singleton database object in a global file at the top of my document. In most other locations I am able to access it just fine, however in my footer I want to loop through a properties list for links (I am saving links to a database, each with its own properties). Here is the code snippet

Re: [PHP] Regexp and Arrays

2010-01-02 Thread Allen McCabe
I think part of the problem may lie in the use of variables in regular expressions. I am trying to use the perl-style preg_match(), but the regular expression values that it checks on each iteration of the foreach loop checks for a different value (hence, the use of a variable). On Sat, Jan 2, 201

[PHP] Regexp and Arrays

2010-01-02 Thread Allen McCabe
I have been plauged for a few days by this, can anyone see a problem with this function?? function printByType($string, $mode) { (string) $string; $lengths = array( 'VARCHAR' => 10 , 'TINYINT' => 1 , 'TEXT' => 10 , 'DATE' => 7 , 'SMALLINT' => 1 , 'MEDIUMINT' => 2 ,

[PHP] Arrays & Regexp - Help Requested

2010-01-01 Thread Allen McCabe
Happy New Year, here's my first question of the year (and it's only 15 hours into the year!). I am creating a small database management tool for my a website (my work IP blocks my access to PhpMyAdmin) and I don't want to install any additional software. I am working on adding rows and need to fo

[PHP] Accessing Objects - Object to Object Communication

2009-12-26 Thread Allen McCabe
I have a Database class that I instantiate with credential information. The connect method connects and creates a resource by the name $link_id. So if I do this: $db = new Database($server, $user, $password, $database); $db->connect(); To get the resource (for use by mysql_insert_id() for example

Re: [PHP] Form validation issue

2009-12-24 Thread Allen McCabe
Tedd, If you are using a post method using $_SERVER['PHP_SELF'], then values are present in the POST array, hence, you would write your html with interspersed php like so: I sometimes use a function for the echoing of these values if I use the same form for first time (ie. registration) and edi

Re: [PHP] OOP: __construct() and "extend"

2009-12-22 Thread Allen McCabe
Extended classes may have their own constructors which are implicitly called, and as Jonathan mentioned, the constructor of any ancestors (ie. the parent) must explicitly be called. If the child (extended) class does NOT have it's own constructor method defined, the parent's constructor is called.

Re: [PHP] Class not functioning (RESOLVED)

2009-12-18 Thread Allen McCabe
nswer your question? > > Btw; Shawn; Assuming that your Registry class holds objects, there is no > need have the ampersand in front of the get method or $object argument. > Objects are *always* references. And you might want to look at the __get, > __set and __isset magic. > > Wouter

Re: [PHP] Logic of conditionals and the ( ) operators (RESOLVED)

2009-12-18 Thread Allen McCabe
009-12-18 at 10:21 -0800, Allen McCabe wrote: > > In a nutshell: > > Will this work? > > if ($perm == (11 || 12)) > > > Explanation: > > I am laying the groundwork for a photo viewing system with a private and > public mode, and additionally if an admin is logged in

[PHP] Logic of conditionals and the ( ) operators

2009-12-18 Thread Allen McCabe
In a nutshell: Will this work? if ($perm == (11 || 12)) Explanation: I am laying the groundwork for a photo viewing system with a private and public mode, and additionally if an admin is logged in, there is an additional level of permission. I came up with a number system to make it easier (an

Re: [PHP] Class not functioning

2009-12-15 Thread Allen McCabe
Wouter, Implementing your static idea was pretty easy, I was already referencing Notifier with the :: operator in my other methods, however I am running into trouble assigning new values to the static array. I am getting a "syntax error, unexpected '[' " on this line of my Notifier class: Notifi

Re: [PHP] Class not functioning

2009-12-15 Thread Allen McCabe
be accomplished? ?> ... ... printQ() ?> On Mon, Dec 14, 2009 at 6:07 PM, Nirmalya Lahiri wrote: > --- On Tue, 12/15/09, Allen McCabe wrote: > > > From: Allen McCabe > > Subject: [PHP] Class not functioning > > To: "phpList" > > Date: Tuesday, Dec

[PHP] Class not functioning

2009-12-14 Thread Allen McCabe
Hey everyone, I just delved into classes recently and have been having moderate success so far. I have a puzzler though. I have the following class decalred and instantiated: class Notify { var $q = array(); public function addtoQ($string, $class) { $message = ''. $string .''; $this->q[]

[PHP] refuses to complete all queries

2009-12-09 Thread Allen McCabe
I have a "PURGE ORDERS" link that calculates which orders are made up entirely of expired shows and deletes them. Well, that's idea anyhow. The procedure does 3 things: 1. Gets the order_id of all orders that contain all expired shows 2. Deallocates the quantity of the seats on each show from the

[PHP] Filtering results via user input

2009-12-08 Thread Allen McCabe
I wrote a function (inferior no doubt) that takes the values of a form with a get method to filter results from the database. It is a list of orders, and I need to be able to filter by the user, the user's school, or specific items (find all orders that have *this* item). I thought I figured out

[PHP] cookies and carts

2009-12-07 Thread Allen McCabe
I have a shopping cart type system set up which keeps track of the cart contents using a SESSION variable, where $_SESSION['cart'][$item_id'] is equal to the quantity, so the name/value pair is all the information I need. But sessions are unreliable on the free server I am currently using for this

[PHP] mysterious include problem

2009-12-07 Thread Allen McCabe
I have been using includes for my content for a while now with no problems. Suddenly it has stopped working, and it may or may not be from some changes I made in my code structure. I use default.php for most or all of my pages within a given directory, changing the content via page numbers in the

[PHP] includes linking to other files, help with relatives

2009-12-06 Thread Allen McCabe
I am creating a database connection path that check for a session variable to get the username, password, dbname, etc., but if the session has not been set yet, I need my script to get those values from another file (KEY.txt) where they are saved. I want to access this class from two directories, a

[PHP] CMS - Deployable Zip and MySQL idea

2009-12-05 Thread Allen McCabe
For the fun (and experience) of it, I am building a PHP content management system compatible with MySQL. I want to be able to drop a ZIP file into someone's root folder, extract, and load the index file in the admin folder is deploys. I had that part worked out, redirect the user to a "Add MySQL C

[PHP] Storing (html and php) Content in MySQL - help

2009-11-30 Thread Allen McCabe
I have been trying to wrap my mind around how to accomplish this for a few days, and done estensive searching on Google. I know there are free CMS systems available for download, but I want to write my own code so I can maintain it and extend it, I need it to be customizable. So far what I have w

[PHP] SESSIONS & classes

2009-11-30 Thread Allen McCabe
I am trying to implement a relatively complete login system code for my website, but the code is a bit dated ($HTTP_POST_VARS for example). I am not too familiar with classes and I'm having trouble with this one. I have an include which is the login form if the SESSION is not set, and a mini cont

[PHP] register_globals and sessions

2009-11-25 Thread Allen McCabe
LPAC - Arts for Youth - Seat OrdersI am getting the following error message, but ONLY on a page where I am querying multiple tables, and I don't see the correlation: * * *Warning*: Unknown: Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that t

Re: [PHP] function not returning query

2009-11-23 Thread Allen McCabe
y=school&schoolid=36&orderby1=order_id&asc_desc_order1=Descend&orderby2=pmt_recd_date&asc_desc_order2=Descend&filter.x=13&filter.y=8&filter=Go On Mon, Nov 23, 2009 at 8:03 PM, Philip Thompson wrote: > On Nov 23, 2009, at 6:22 PM, Allen McCabe wrote: > > >

[PHP] function not returning query

2009-11-23 Thread Allen McCabe
Hi, thanks for reading, I hope you can help: In my main file for an orders page I have the following code: if (isset($_GET['filterby'])) { $resultOrders = adminFilterQuery(); $numberOfOrders = mysql_num_rows($resultOrders); } else { $resultOrders = mysql_query("SELECT * FROM afy_order;

[PHP] [php] & [mysql] select and subselect

2009-11-16 Thread Allen McCabe
I have a page on my site where I can optionaly filter by certain fields (order by filesize or file category), but I am implementing a shopping cart type of idea where users can submit an order. As administrators, my coworkers and I need to be able to filter orders by their contents. For example:

[PHP] Custom function for inserting values into MySQL

2009-11-02 Thread Allen McCabe
Okay friends, I have been wondering about writing a simple function that will help me with my MySQL inserting. Not because I need to save time and space, but because I wanted to. I wrote a function for inserting 10 values (I have not been able to come up with an idea how to make the number of valu

Re: [PHP] [php] INSERT and immediately UPDATE

2009-10-28 Thread Allen McCabe
You all are great! Thank you so much. On Wed, Oct 28, 2009 at 12:27 PM, Martin Scotta wrote: > > > On Wed, Oct 28, 2009 at 4:21 PM, Allen McCabe wrote: > >> Hey everyone, I have an issue. >> >> I need my (employee) users to be able to insert shows into

[PHP] [php] INSERT and immediately UPDATE

2009-10-28 Thread Allen McCabe
Hey everyone, I have an issue. I need my (employee) users to be able to insert shows into the our MySQL database and simultaneously upload an image file (and store the path in the table). I have accomplished this with a product-based system (adding products and uploading images of the product), a

[PHP] running str_replace, it misbehaves!

2009-08-16 Thread Allen McCabe
Hi friends, I'm trying to get an encrypting program working to possibly use for password insertion into a db. I set up a function that runs str_replace on a string (user supplied) two times. It searches for a single letter or number, and replace it with a pair. The next str_replace searches that n

Re: [PHP] session variables - help RESOLVED

2009-08-14 Thread Allen McCabe
with. On Fri, Aug 14, 2009 at 11:13 AM, Ben Dunlap wrote: > Great, hope it helps! -Ben > > On Fri, Aug 14, 2009 at 10:52 AM, Allen McCabe > wrote: > > This is an EXCELLENT idea. > > >

Re: [PHP] session variables - help

2009-08-14 Thread Allen McCabe
Fri, Aug 14, 2009 at 7:52 AM, Ford, Mike wrote: > > -----Original Message- > > From: Allen McCabe [mailto:allenmcc...@gmail.com] > > Sent: 14 August 2009 06:58 > > > > Here is some more complete code: > > > > [code = order_process.php] > > > >

Re: [PHP] session variables - help

2009-08-13 Thread Allen McCabe
Ben, First of all, I thank you for your time and help. My ai with using unset($var) in update_order.php is to set the SESSION variable for an item to ' ' (empty) so that it would not show up on the order summary (because my writeResultRow() function will only write a row if that variable is great

[PHP] session variables - help

2009-08-13 Thread Allen McCabe
I am asking a similar question to one I asked yesterday (which received no answers) with more information in the hopes someone will be kind enough to guide me. I have an order form populated with an array (as opposed to a database table). The user can enter quantities, and the form posts all the i

[PHP] Remove function

2009-08-12 Thread Allen McCabe
Hey all. I am creating an online order form which will submit an order quest to email, there are no products and no transactions (seat reserving). Currently, I have a form that is populated with shows and times and prices from an external php file (each show is an array, embedded in a shows array

[PHP] Is select_db necessary?

2009-08-11 Thread Allen McCabe
I have seen different scripts for working with SQL, and most follow the same method with on difference. Variables are defined (host, password, etc.) mysql_connect command //then, the difference mysql_select_db command //back to common $sql = "SELECT ... " $result = mysql_query($ql) Is the dat

Re: [PHP] Embedding foreach loops

2009-08-10 Thread Allen McCabe
I am using the print function to display my html. I cannot get the line return ( \n ) character to actually push the html onto the next line, it just gets displayed instead. Should I be using echo? On Mon, Aug 10, 2009 at 3:41 PM, John Butler wrote: > > I did this, and got my arrays dumped (on

Re: [PHP] Embedding foreach loops

2009-08-10 Thread Allen McCabe
John, I did this, and got my arrays dumped (on one line). After adding line returns, here is a snippet: [code=array dump] array(38) { ["show_01"]=> array(5) { ["title"]=> string(29) "Van Cliburn Gold Medal Winner" ["date"]=> string(16) "Tues. 10/13/2009" ["time"]=> string(4) "11am" ["price"]=> f

[PHP] Embedding foreach loops

2009-08-10 Thread Allen McCabe
Gmail automatically sent my last email, apologies. I am creating an order form for tickets for a list of performances at a performing arts center. Currently, the form is on paper, and is set up as follows: -Title - date - time - price - soldout - quantity - total($) -Nutcracker - Tues 10/13

[PHP] Embedded foreach loops

2009-08-10 Thread Allen McCabe
I am creating an order form for tickets for a list of performances at a performing arts center. Currently, the form is on paper, and is set up as follows: -Nutcracker - Tues 10/13 - 11am - $4.00

Re: [PHP] Trying to create a comment function (RESOLVED)

2009-08-06 Thread Allen McCabe
Asher and Jonathan, Thank you for your input. Having single quotes around what I wanted to comment worked to display a variable name. And Asher, I am constantly scanning the php.net manual, and only after I could not find what I was looking for did I resort to php-general list. I am a novice at p

[PHP] Trying to create a comment function

2009-08-06 Thread Allen McCabe
I was trying some new things with php today, and was commenting above each little bit to better see what was working and/or displaying versus what was not. My comment delineator consisted of the following: [code] echo ' this is a comment displayed in html '; [/code] Then I decided to create a c

Re: [PHP] navigation include not functioning (RESOLVED)

2009-08-05 Thread Allen McCabe
ess performance > $pages = array('about' , 'services', 'portfolio', 'contact'); > $page = array_key_exists( 'page', $_GET ) ? $_GET[ 'page' ] : 'about'; > if( false === array_search( $page, $pages, true )) > { >

Re: [PHP] navigation include not functioning

2009-08-05 Thread Allen McCabe
ng this. What do you think? 2009/8/5 ollisso > On Wed, 05 Aug 2009 22:08:30 +0300, Allen McCabe > wrote: > > You can do something like that: > > links: > Contact > > This will work if you have only one file, all the time and it is default > one for current folder.

Re: [PHP] navigation include not functioning

2009-08-05 Thread Allen McCabe
Jerry Wilborn > jerrywilb...@gmail.com > > > > On Wed, Aug 5, 2009 at 12:00 PM, Allen McCabe wrote: > >> I am trying to generate pages by importing content in includes, and using >> my >> navigation include to tell PHP to replace a $thisPage variable which all &g

[PHP] navigation include not functioning

2009-08-05 Thread Allen McCabe
I am trying to generate pages by importing content in includes, and using my navigation include to tell PHP to replace a $thisPage variable which all the includes use The idea behind it (I know tons of people do it, but I'm new to this concept), is to have a 'layout' page where only a variable ch

Re: [PHP] HELP - Parse Error

2009-08-04 Thread Allen McCabe
, Aug 4, 2009 at 10:58 AM, Ashley Sheridan wrote: > On Tue, 2009-08-04 at 10:56 -0700, Jim Lucas wrote: > > Allen McCabe wrote: > > > *Parse error*: syntax error, unexpected $end in * > > > /home/a9066165/public_html/admin/processccu.php* on line *231* > > >

Re: [PHP] HELP - Parse Error

2009-08-04 Thread Allen McCabe
Well, I got it to display a thank you page instead of what I had. I'm rolling with the punches. Got to work on why my email table is not building right. Stay tuned! On Tue, Aug 4, 2009 at 11:09 AM, Allen McCabe wrote: > Ashley - I am formatting this way, it just didn't transla

Re: [PHP] HELP - Parse Error

2009-08-04 Thread Allen McCabe
load processccu.php, it says it cannot display the webpage. note: I did address the mismatch of the DIV and TABLE (including TR's, TD's) tags, so I don't think it's my HTML. On Tue, Aug 4, 2009 at 10:58 AM, Ashley Sheridan wrote: > On Tue, 2009-08-04 at 10:56 -07

[PHP] HELP - Parse Error

2009-08-04 Thread Allen McCabe
*Parse error*: syntax error, unexpected $end in * /home/a9066165/public_html/admin/processccu.php* on line *231* I did some major code rewriting about halfway through (lines 114-132), and suddenly I'm getting the above ERROR. I have examined the code line by line, but I'm still relatively new to t

[PHP] issue with mail function

2009-08-04 Thread Allen McCabe
I have recently been working a lot lately with arrays and printing them into html tables for email (like a user survey for example). I have been seeing odd things with the table lately, each unique to it's sending php file. I will get a space in a random spot. In one, I used an array to rename the

Re: [PHP] isset not functioning -RESOLVED

2009-08-03 Thread Allen McCabe
Thanks! On Mon, Aug 3, 2009 at 10:13 AM, Andrew Ballard wrote: > On Mon, Aug 3, 2009 at 1:08 PM, Allen McCabe > wrote: > > I created a simple survey for my work website, most of the PHP is on my > > process.php document, which is referenced by a form on a seperate page >

[PHP] isset not functioning

2009-08-03 Thread Allen McCabe
I created a simple survey for my work website, most of the PHP is on my process.php document, which is referenced by a form on a seperate page containing the form with the method of "post". On my process.php page, the script obtains the field data using the $_REQUEST[] function. I have a small if

[PHP] Re: Creating/printing array issues

2009-07-28 Thread Allen McCabe
By the way, I was getting a PHP error with an unexpected ")" on line 47 ($aryPhotos), so I added the two \\ before {survey*_.php and now the page won't load, won't even display a PHP error. On Tue, Jul 28, 2009 at 11:06 AM, Allen McCabe wrote: > I found a php script to f

[PHP] Creating/printing array issues

2009-07-28 Thread Allen McCabe
statement to say there are no "surveys" (survey_*.php files) available if there are none in the /surveys directory. Any and all help would be greatly appreciated! -Allen McCabe