Re: [PHP] Getting the FULL path

2003-10-02 Thread J Morton
$_SERVER['SCRIPT_FILENAME'] or $_SERVER['DOCUMENT_ROOT']

Justin

zavaboy wrote:

> How do I get my FULL path... I made a web-based installer and it uses a
> path.
>
> Ok, my path to where I need it is:
> /home/jimbug/public_html/zavaboy/phptest/ZML
>
> Using dirname():
> /phptest/ZML
>
> Why is that?
> How can I get PHP to output '/home/jimbug/public_html/zavaboy/phptest/ZML'
> automatically?
>
> --
>
> - Zavaboy
> [EMAIL PROTECTED]
> www.zavaboy.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] passing form information.

2003-10-02 Thread J Morton

Payne wrote:

> Hi,
>
> I am working a form to pass information from it to mysql data.  I am
> able to connect to the database. But nothing is being pass from the form
> to the php page.  This is my php code...
>
> -form.html
>
> 
> 
> Untitled
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
> --addleads.php--

first off i guess this is addlead.php (without the s or your post action is wrong
above.)

>
> 
> include("./config.php");
>
> $sql = "INSERT INTO $table_name
> (leads_id, title, f_name, l_name)
> VALUES
> ('$leads_id', \"$title\", \"$f_name\", \"$l_name\")";

Don't insert data into your auto-increment field.  Just use $sql = "INSERT INTO
$table_name (title, f_name, l_name)
VALUES ('$title', '$f_name', '$l_name')"; and use ' instead of " to encapsulate
your variables.  If they are not available in PHP after posting use $_POST["varname"]
instead of $varname.  (even in the SQL query if you prefer)

Justin

>
>
> //debug tool
>
> print $sql;
>
> $result = mysql_query($sql, $connection) or
> die ("Couldn't execute query.");
>
> ?>
> 
> 
> Untitled
>
> 
> 
>
> 
> 
> 
> 
> 
>  
>
> ---
>
> What I am getting this
>
> INSERT INTO leads (leads_id, title, f_name, l_name) VALUES ('', "", "", "")
>
> *Salutation*
>
>
>
> *First Name*
>
>
>
> *Last Name*
>
> As you can see nothing is being pass...is there some other command
> beside the print $sql statement to see why nothing is being passed.
>
> 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] Dates

2003-10-02 Thread J Morton
date("Y-m-d", strtotime($your_date))

Payne wrote:

> Hi ,
>
> This might be mysql question but how can I change a US format date
> (mm/dd/) to a MySQL Format (/mm/dd).  Can I do this will php or
> will need let say javascript or perl to do this?
>
> Payne
>
> --
> 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] date brain teaser

2003-10-02 Thread J Morton
Sure --

";
}

$this_date = date("n/j/Y",mktime(0,0,0,date("m",
strtotime($this_date)),date("d", strtotime($this_date))+1,date("Y",
strtotime($this_date;
}
?>


Shew wrote:

> Hi,
>
> I'm trying to find a formula for displaying the date for every Friday of a
> given year, i.e. 2003
>
> Jan 3, 2003
> Jan 10, 2003
> Jan 17, 2003
> etc.
>
> Any ideas?
>
> 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] date brain teaser [fix]

2003-10-02 Thread J Morton
Sorry I had a parentheses out of place, it should have been:

";
}

$this_date = date("n/j/Y",mktime(0,0,0,date("m",
strtotime($this_date)),date("d", strtotime($this_date))+1,date("Y",
strtotime($this_date;
}
?>

Hope this helps,
Justin

Shew wrote:

> Hi,
>
> I'm trying to find a formula for displaying the date for every Friday of a
> given year, i.e. 2003
>
> Jan 3, 2003
> Jan 10, 2003
> Jan 17, 2003
> etc.
>
> Any ideas?
>
> 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] Re: ADDR.COM

2003-10-02 Thread J Morton
I, for one, will be glad to see they are gone (if indeed that is the
case).

By the way the site is loading fine for me.

They have shifty business tactics and actually used my design and one of
my
clients as part of their "portfolio" -- claiming it as their own   I
have
never had any affiliation with them before or after that.  It was only
by
threatening a cease and desist they took it down, finally.

The hell with them.

Just my 2 cents.
Justin

Ryan A wrote:

> > Hey Ryan
>
> Hey,
>
> > I think it is possible addr.com is gone for good.  They were
> > controversial in the past, and now all their stuff, including their
> > phone numbers (!) is "gone" (i.e. disconnected).  I have been with them
> > since 1999, but am making other arrangements today to try and limit the
> > damage.  Still, pretty major disaster.  Please let me know if you find
> > out anything more.
>
> I seriously doubt that they have just gone like that unless someone packed
> all the $$ into a very large suitcase and took off, :-D I think they might
> have some kind of outage or settings problem...and cant really rule out
> hacking.
> Either way, i have downloaded and backed up the whole website.
>
> Addr had/has a huge clientbase...pretty unlikely they will run and leave
> their thousands of customers (and hundreds of thousands of $$ per month) for
> nothing.
>
> The company I work for is getting skittish about it though as they just
> opened their site yesterday.
>
> On a private note:
> they were always a bit too expensive for me.
>
> Cheers,
> -Ryan
>
> >
> > Cheers
> > Max
> >
> > __
> > Do you Yahoo!?
> > The New Yahoo! Shopping - with improved product search
> > http://shopping.yahoo.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] Converting various DB's to MySQL using PHP

2003-10-02 Thread J Morton
Hi all --

Summary: Using PHP, need to go from ACCESS -> MySQL.  (Millions of
records, hundreds of tables.)

I am about to embark on a project over the next week which entails (in
part) developing a PHP platform that will convert an Access DB to MySQL,
as well as perform all needed error-checking and appropriate field-type
setup.  In the future I will modify the same script to support other DB
types like Postgres, MS, Oracle, etc.  Rather than having PHP access
these foreign DB types I will have it access a delimited text output of
the DB's.

Before I got started, I thought I would check in here to see if anybody
knows of a similar tool that already exists and perhaps I can learn
something from it and benchmark against it as I proceed.  Also, any tips
or advice would be muchly appreciated.  I am sure this has been done
many times over in PHP but I do not see where.

Thanks!!
Justin

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



Re: [PHP] set the PHP to look at library files.

2003-10-03 Thread J Morton
I would suggest creating a path alias in your Apache httpd.conf file to recognize 
(i.e) /includes/ and redirect as needed.
Justin

"Golawala, Moiz M (IndSys, GE Interlogix)" wrote:

> Hi,
>
> I am running PHP with apache. I put all my webpages in the htdocs folder. A lot of 
> my scripts use a bunch of open source libraries. Until now I have been including 
> these libraries in my scripts by defining a full path to the library 'inc' files. If 
> I put the library itself in my htdocs folder I can see it. However, I want to simply 
> include the library by saying:
>
> include ("xmlrpc.inc");
>
> I don't want to put the absolute path in the include statement nor do I want to have 
> the xmlrpc.inc file in the same directory as the script that needs it. Is there a 
> some configuration setting in the php.ini file that I can set so that It always 
> points to some path to look for the include files (It would be nice if the any thing 
> below that path is also seen if I set the path. So if i set the path in the 
> configuration to see /usr/home/ , even if i put something under /usr/home/install/.. 
> I will be able to pick it up.) Thank in advance for any help.
>
> Moiz
>
> --
> 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