[PHP] Field type for american money

2009-06-11 Thread revDAVE
Php - MySQL - newbie question

- Field type for american money - int(11) seems to work fine

- but also I tried decimal(10,2)

Is one a better choice than another for american money usage?


--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists 09]




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



[PHP] Redirect not working on server

2009-06-02 Thread revDAVE
I have this line at the end of 1 big php block...

header('Location: mypage.php?id=' .
$_SESSION['id'].'cat='.$_SESSION['cat']);

It works fine on my dev. Testing server but does not forward on the actual
website

Any way to fix this?



Home is php 5

Server (not sure) might not be 5 - maybe v4

Could that be the problem?


--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists 09]




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



Re: [PHP] Redirect not working on server

2009-06-02 Thread revDAVE
I found the answer here - I had --- whitespace  ... if ?php is at line 2

Location: http://www.phpbuilder.com/board/showthread.php?t=10310794

Blank space above the php tag or below the final php tag
It is not intuitive but ...

if ?php is at line 2 of your script and a blank line is above it then that
can cause problems such as the php header function not working.


=


*So I just need to get this working... error_reporting(E_ALL);

If I put this on a page isn't it supposed to override other server setting
and display errors? It's not - This the page is blank - except for the echo
test



--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists 09]




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



Re: [PHP] Redirect not working on server

2009-06-02 Thread revDAVE
Thank you Jay - Shawn  Paul for helping this newbie!


--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists 09]




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



[PHP] Newbie - Setting Up Some Basic Sendmail Scripts

2009-05-05 Thread revDAVE
[Newbie]

Hi folks,

I'm trying to set up some basic php send mail scripts - and I'm curious of
the best way to go...


I checked these basics out:

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

And got this code below going, but I'll bet I need a bit more - like adding
authentication - smtp - port - sending user / pass etc.

Any hints how to get this to the next level?

Thanks in advance - dave



?php
$to  = 'nob...@example.com';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: webmas...@example.com' . \r\n .
'Reply-To: webmas...@example.com' . \r\n;

mail($to, $subject, $message, $headers);
?




--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists 09]




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



Re: [PHP] Newbie - Setting Up Some Basic Sendmail Scripts

2009-05-05 Thread revDAVE
On 5/5/2009 10:41 AM, Bastien Koert phps...@gmail.com wrote:


Thanks Bastien  - I'll check them out...

 use phpmailer or pear mailer

On 5/5/2009 10:59 AM, Tom Worster f...@thefsb.org wrote:

 use phpmailer or pear mailer
 
 agree. php's interface is a bit basic. and if you compile php with openssl
 then you can also use pear mail with smtp over ssl.
 
 http://pear.php.net/manual/en/package.mail.mail.php

Thanks Tom,

I'm working with php 5 so is the 1.2.0b1 (beta) safe to use or should I go
with the older stable 1.1.14?

- - - - -
From: Mail
Location: http://pear.php.net/package/Mail
- - - - -

Info: 
Current Release» Bug Summary
1.2.0b1 (beta) was released on 2008-07-02 (Changelog)
1.1.14 (stable) was released on 2006-10-11 (Changelog)




--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists 09]




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



[PHP] Setting Up A Directory For HTTPS Secure Certificate

2009-04-17 Thread revDAVE
I'm setting up a directory for HTTPS: secure certificate which in the past
was just http:

- I purchased a secure certificate which will be activated soon...

Q: Do I simply redirect any links that previously went to :

relative links:

/thisfolder/file.htm

now to the absolute reference:

https://mysite.com/thisfolder/file.htm ?

Then, once inside the secure dir. I can then go back to relative links and
they will stay in the secure folder - right?

- - - - -


! BUT - what is the best way to lock out users from going to the old, NOT
secure folder?


http://mysite.com/thisfolder/

?

- Someone mentioned modifying the .htaccess file and add some redirects -
I'll need some help with exactly how to do it - any ideas?

- also I imagine I can write some PHP code to redirect pages...

Q: what is the best way to accomplish this?

Thanks for your help

--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists 09]




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



Re: [PHP] Setting Up A Directory For HTTPS Secure Certificate

2009-04-17 Thread revDAVE
GOAL : no one will be able to get to HTTPS directory VIA HTTP.

So I make this little tester page that seems to work Later I'll add auto
redirect Is this the kind of thing to add to various pages? Is there a
better way to do this?


?php
if ($_SERVER['HTTPS'] == 'on')
{ 
} else
{
?

a href=?php
echo 'https://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
??php
echo 'https://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
?/a
?php
}
?





--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists 09]




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



[PHP] Importing Data with Field Names

2009-03-20 Thread revDAVE
Newbie...

I have phpmyadmin...

I'm basically looking for a quick way to import records and avoid hand-
typing many field names (I can set the field types later)

Is there a way to import into mySql with let's say a csv file - (or Tab
delimited file) and have the first row be the field names. Then might you be
able to import into a mysql database table (with / or without it's own
preexisting field names) and have the import auto-setup the field names from
the 1st row?

BTW: let's assume the file has many fields and a small amount of records
(no timeout issues)

I could use some help getting started with this



--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists 09]




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



[PHP] Trying To Read - Show A Csv File Line By Line

2009-03-20 Thread revDAVE
Newbie ... I'm trying to Trying to read / show a csv file line by line ...

I think that a csv file would have a line delim of chr(10) or chr(13) or
something ... Fgets doesn't seem to see it


Q: How do I get it to see 1 line at a time and display it with br/ in
between?

Thanks in advance

= 


?php

$handle = fopen(try3.csv, r);

if ($handle) {
while (!feof($handle)) {
   // $buffer = fgets($handle, 4096); // tried w  w/o 4096 length
$buffer = fgets($handle);
echo $buffer.'br/br/';
}
fclose($handle);
}
?


--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists 09]




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



Re: [PHP] Trying To Read - Show A Csv File Line By Line

2009-03-20 Thread revDAVE
On 3/20/2009 2:37 PM, kirk.john...@zootweb.com kirk.john...@zootweb.com
wrote:

 revDAVE c...@hosting4days.com wrote on 03/20/2009 03:11:00 PM:
 
 Newbie ... I'm trying to Trying to read / show a csv file line by line
 ...
 
 fgetcsv is your friend.
 
 http://us.php.net/manual/en/function.fgetcsv.php

Thanks Kirk for your help

Hmmm - when I tried this example on the link - it echoed every field on it's
own line - but did NOT recognize the returns (each row) of the csv...

Q: how do I just pull out 1 whole row at a time?



?php
$row = 1;
$handle = fopen(try3.csv, r);
while (($data = fgetcsv($handle, 1000, ,)) !== FALSE) {
$num = count($data);
echo p $num fields in line $row: br //p\n;
$row++;
for ($c=0; $c  $num; $c++) {
echo $data[$c] . br /\n;
}
}
fclose($handle);
?





--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists 09]




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



[PHP] Dynamic Form 'on The Fly'

2009-03-18 Thread revDAVE
Using a repeating region of a query, I want to generate a 'form on the fly'

So for each repeat - I have an extra form input

Each input name = thisline?php echo $cnt; ?

So it will make names like:

thisline1
thisline2
thisline3
Etc.

For the form fields

-


$cnt = 1;
form action=form1.php method=post name=test1

Repeat.
 
input name=go?php echo $cnt; ? type=text value= size=5
maxlength=5 /

 ?php  $cnt++; ?

Repeat..



Q: how do I code the POST line to READ this when processing this form?

like:

$cnt = 1;

 ?php echo $_POST['thisline$cnt']; ?  Doesn't work...?
 ?php echo $_POST['thisline'].$cnt; ? Doesn't work...?

Not this either...
$this = 'thisline'.$cnt;
echo $_POST['$this'];


$cnt++

Q: ANY Ideas?


--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists 09]




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



[PHP] Re: Summary Report With Details - Newbie Question

2009-03-16 Thread revDAVE
On 3/14/2009 5:13 PM, Christian Wagner ch...@unna-youth.de wrote:

 Hi,
 I would select all items with a single select.
  SELECT name,model, condition (etc) FROM inventory
 
 Then i'll iterate through the resultset and store them in an array like this
 
 $items = array();
 while($row = next())
 {
 // Gives the total amount of Models
 $items[$row['model']] = $counter++;
 // Stores the condition of a single item of a model
 // $items[$row['model']] makes sure, that the single item
 // will be stored at the correct position
 // 
 $items[$row['model']][$row['id']] = $row['condition']; 
 }

Here's my query... (no group by - right?)

mysql_select_db($database_test, $ test);
$query_getall = SELECT id, model,condition FROM inventory ORDER BY model
ASC;
$getall = mysql_query($query_getall, $test) or die(mysql_error());
$row_getall = mysql_fetch_assoc($getall);
$totalRows_getall = mysql_num_rows($getall);



Thanks for your help Christian,

I guess my 'newbie' is showing ... Because I'm having trouble getting this
to work...
 
1 - on this line I get : Warning: Wrong parameter count for next() in
/Libr...

while($row = next())

- I tried this - with no errors

while($row = mysql_fetch_assoc($getall));
// not sure if it's right?

--

2 - Then got error here: Warning: Cannot use a scalar value as an array in
/Library/WebServer

$items[$row['model']][$row['id']] = $row['condition'];

Q: How can I fix this?


   

--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists 09]




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



Re: [PHP] Summary Report With Details - Newbie Question

2009-03-16 Thread revDAVE
On 3/14/2009 9:31 PM, Paul M Foster pa...@quillandmouse.com wrote:

 
 I'm not an expert, but the way I normally do something like this is with
 a join that would give name, model and condition on each row (so you
 have a lot of duplicate fields which are the same for a series of
 records). I make sure they're ordered properly, and then process them in
 a loop. Something like:
 
 $product = '';
 $count = 0;
 while ($a = fetch_array()) {
 if ($product != $a['name']) {
 // do whatever for prior product
 // do whatever for new product
 // $count will be the number of a given product
 $product = $a['name'];
 }
 else {
 $count++;
 // print out whatever you need to
 }
 }

Hi Paul - I appreciate your assistance,


$product = '';
$count = 1;
while ($a = mysql_fetch_assoc($getall)) {
if ($product != $a['model']) {


echo 'br/ COUNT: '.$count.' final previous'.'br/br/';

$count = 1; // resets count for each new model
echo ' model: '.$a['model'].'br/br/'; // model title line
echo $a['id'].' - condition: '.$a['loc'].' 1br/'; // start detail row
list
$product = $a['model'];
}
else {

$count++;
echo $a['id'].' - condition: '.$a['condition'].' 2 br/';
}
}

--

Produces something like:

COUNT: 39 (final previous)

model: MODEL 22-A

34 - condition: good
33 - new
32 - old
305 - new

Etc...



Paul - this seems to work (if I understand you correctly...), but I would
like to have a title line (above) say:

MODEL - 22-A - COUNT: 39

At the top ... Currently - the way I have it wants to display the *count
BELOW* the line items - (when it's done counting) .. And I fooled with this
line;

echo 'br/ COUNT: '.$count.' final previous'.'br/br/';

Which 'sort of' shows at top - but doesn't really help the 1st item...

Q: any way to improve this?







--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists 09]




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



Re: [PHP] Summary Report With Details - Newbie Question

2009-03-16 Thread revDAVE
On 3/16/2009 7:17 PM, Paul M Foster pa...@quillandmouse.com wrote:

 Well, I was dubious about my answer, based on the idea that someone else
 might have a better way. However, it appears not.
 
 So what I would do is probably, instead of echoing stuff immediately,
 I'd just append it to a string until you're ready to output a total
 line. Then output the total line, and immediately after, output the
 string you accumulated while counting. Make sense? The whole point in
 the first place, as I recall, was to avoid umpteen database queries. So
 what you're doing is to load it all up at once and then let PHP do the
 heavy work instead of the database. But the total you want is only
 available after you've processed all the records for that item/model. So
 if you want it to come first on screen, you'll have to accumulate all
 your detail lines as you go. Then when the total is ready, output that
 and then output all the stuff you've accumulated. I don't know any
 better way to do it.
 
 If it's still not clear, let me know.


Thanks for your help PAUL - with your explanation I got it working - Yipee!!

Like this 

==

$product = '';
$productlast = '';
$show='';
$count = 1;
while ($a = mysql_fetch_assoc($getall)) {
if ($product != $a['model']) {

 if ($productlast != '') {
echo 'br/br/br/MODEL: '.$productlast.' TOTAL COUNT '.$count.'
br/br/ '.$show;}

$show='';
$count = 1; // resets count for each new model
$product = $a['model'];
$show = $show . $a['model'].' '.$a['id'].' - loc:
'.$a['condition'].' 1br/';


}
else {
$count++;
$productlast = $a['model'];
$show = $show .  $a['model'].' '.$a['id'].' - loc '.$a['
condition'].' 2 br/';
}
}



--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists 09]




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



Re: [PHP] Fatal error: Call to undefined function: mysqli_connect() in

2009-03-14 Thread revDAVE
On 3/14/2009 10:36 AM, Gary gwp...@ptd.net wrote:

 Can anyone enlighted me as to what I am not doing correctly?


Hi Gary,

I am hosted using a basic cpanel interface ... There's a button = Remote
MySQL which brings up a page: Remote Database Access Hosts

And I put in my HOME IP and all works fine now ...

Not sure how godaddy does it... Maybe ask tech support How to set up
Remote MySQL access

--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists 09]




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



[PHP] Summary Report With Details - Newbie Question

2009-03-13 Thread revDAVE
Hi Folks,

I would like to make a summary report with details for a products inventory
list - so it could list:

A - the product  a few summaries like total count on 1 line
B - --- below that: the details of a multi line sub list with inventory
data like:

A - PRODUCT #1 - count = 25
B -- id 56 - condition = good
 id 98 - condition = new
A - PRODUCT #2 - count = 18
B -- id 205 - condition = new
 id 381 - condition = poor

and repeat for all inventory products

-

The way I'm doing it now is :

main query #1

SELECT name,model, count(prid) as thecount FROM inventory group by model

then do a repeat region table to display 1 of each

- then - on each row - do sub query#2 :

SELECT name,model, condition (etc) FROM inventory where model =
quety#1.model

- then display these details in a sub table


Q: This seems to work fine. I was just wondering if there is a better way to
construct queries to get the same result?


Thanks in advance for your help...

--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists 09]




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



[PHP] English Website That Can Display Some Chinese Text

2009-03-13 Thread revDAVE
I have an English website done using PHP  mySQL.

In addition I would like to be able to store in mySQL and display/edit (php)
some extra fields that have some basic Chinese text.

I imagine I would have to update the main site to use English  Chinese
somehow...

Q: Is something like this possible? If so how is this done...? Is there
something special that needs to be done with PHP  mySQL?


--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists 09]




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



[PHP] Dynamic Date List Newbie Problem

2009-03-12 Thread revDAVE
Hi folks,

My goal was to create a dynamic date related list as follows:

- take the current date (3/12/2009)
- create a new date from it which would be the *1st* of that month -
(3/1/2009)

- then create a list that shows the current and previous 11 months like:

03/1/09
02/1/09
01/1/09
12/1/08
11/1/08 etc...



--- so I did this (not fancy but was working)


$nowts = strtotime(date(m)./1/.date(y));


$m01 = date('m',$nowts-(0))./1/.date('y',$nowts-(0));
$m02 = date('m',$nowts-(86400*30))./1/.date('y',$nowts-(86400*30));
$m03 = date('m',$nowts-(86400*60))./1/.date('y',$nowts-(86400*60));
$m04 = date('m',$nowts-(86400*90))./1/.date('y',$nowts-(86400*90));
$m05 = date('m',$nowts-(86400*120))./1/.date('y',$nowts-(86400*120));
$m06 = date('m',$nowts-(86400*150))./1/.date('y',$nowts-(86400*150));
$m07 = date('m',$nowts-(86400*180))./1/.date('y',$nowts-(86400*180));
$m08 = date('m',$nowts-(86400*210))./1/.date('y',$nowts-(86400*210));
$m09 = date('m',$nowts-(86400*240))./1/.date('y',$nowts-(86400*240));
$m10 = date('m',$nowts-(86400*270))./1/.date('y',$nowts-(86400*270));
$m11 = date('m',$nowts-(86400*300))./1/.date('y',$nowts-(86400*300));
$m12 = date('m',$nowts-(86400*330))./1/.date('y',$nowts-(86400*330));

PROBLEM: all was fine for the last few months but several days back the 1st
few months were wrong - like this...


03/1/09
02/1/09
12/1/08 * wrong
12/1/08
11/1/08 etc...

* I think the math went wrong because FEB had 28 days - not 30 (not sure why
just 1 month JANUARY was wrong...)
I temporarily fixed it with less than 30 day jumps like:


$m01 = date('m',$nowts-(0))./1/.date('y',$nowts-(0));
$m02 = date('m',$nowts-(86400*28))./1/.date('y',$nowts-(86400*28));
$m03 = date('m',$nowts-(86400*58))./1/.date('y',$nowts-(86400*58));
$m04 = date('m',$nowts-(86400*88))./1/.date('y',$nowts-(86400*88));
$m05 = date('m',$nowts-(86400*118))./1/.date('y',$nowts-(86400*118));
$m06 = date('m',$nowts-(86400*150))./1/.date('y',$nowts-(86400*150));
$m07 = date('m',$nowts-(86400*180))./1/.date('y',$nowts-(86400*180));

Q: Any ideas how to fix this issue? (please try to keep it simple - 'cause I
ain't no math wiz either)



--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists 09]




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



Re: [PHP] Dynamic Date List Newbie Problem

2009-03-12 Thread revDAVE
On 3/12/2009 9:39 AM, TG tg-...@gryffyndevelopment.com wrote:

 $currmonth = date(m);
 
 for ($i = 1; $i = 11; $i++) {
 $m[$i] = date(m/d/y), mktime(0,0,0,$currmonth-$i, 1, 2009));
 }
 
 Something like that.  mktime() is remarkably flexible.  If you start on
 month 3 and you subtract 5, you get month = -2.   So that would be
 -2/1/2009, which mktime will translate to 11/1/2008.
 
 This is totally off the top of my head, but you get the idea.  Works with
 days and years too.  Sometimes it's useful when going backwards and not
 sure how many days the previous month had (without doing another call to
 find out).
 
 -TG


SOLVED - Thanks so much Andrew  TG

From your examples - I was able to create this working table going back 2
years - thanks again!



table border=1 cellspacing=2 cellpadding=2
  tr
tdDates/td
  /tr
  ?php
$currmonth = date(m);
$curryear = date(y);
$i = 0;
do { ?
  tr
td?php  
$m[$i] = date(m/d/y, mktime(0,0,0,$currmonth-$i, 1, $curryear));
echo $m[$i].'br /';
   $i++ ?
/td
  /tr
  ?php } while ($i  25); ?
/table

 


--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists 09]




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



Re: [PHP] Dynamic Date List Newbie Problem

2009-03-12 Thread revDAVE
On 3/12/2009 12:25 PM, Paul M Foster pa...@quillandmouse.com wrote:

 Crap, I hit the wrong button and sent this only to the OP...
 
 On Thu, Mar 12, 2009 at 09:24:48AM -0700, revDAVE wrote:
 

Thanks for your help Paul - that makes sense!

 
 
 Here is working code to do it better:
 
 // get your starting date
 $darray = getdate();
 $month = $darray['mon'];
 $year = $darray['year'];
 
 // create your months
 $dt = array();
 for ($i = $month; $i = 1; $i--) {
 $dt[] = date('m/d/y', mktime(0, 0, 0, $i, 1, $year));
 }
 
 $year--;
 for ($i = 12; $i  $month; $i--) {
 $dt[] = date('m/d/y', mktime(0, 0, 0, $i, 1, $year));
 }
 
 // print the dates, just as a check
 for ($i = 0; $i  count($dt); $i++) {
 print $dt[$i] . br\n;
 }
 
 This gives you a decending array from the current 1st of the month to
 twelve months prior. The $dt array has mm/dd/yy date strings in it.
 Change as needed.
 
 Paul


--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists 09]




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



Re: [PHP] Re: Setting Up A Web Subscription Service

2009-03-11 Thread revDAVE
Thanks HallMarc  Nathan for the recommendations!

--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists 09]




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



[PHP] Header - Redirect Command Not Working

2009-03-10 Thread revDAVE
Newbie question...

At the end of a php block I'm trying to use a redirect to go to another
page.

header('Location: show.php');

It works on my test server w php 5.2.6 but not at the main server w v 5.12

Is there a way to get it to go to the other page (even with a different
command/function) - or am I doing something wrong?

  

--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists 09]




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



Re: [PHP] Header - Redirect Command Not Working

2009-03-10 Thread revDAVE
Hi Bastien - Stuart  Daniel

Thanks for your help!


On 3/10/2009 12:16 PM, Bastien Koert phps...@gmail.com wrote:

 Are you getting an error? What does 'not working' mean?

No errors the page just stayed on the
header('Location: show.php'); page - never went to: show.php

---

On 3/10/2009 12:17 PM, Stuart stut...@gmail.com wrote:

 Is display_errors on and error_reporting set to at least E_ALL? My guess
 would be your test server has output buffering on but your main server does
 not. Without errors there's no way to be sure.

Not sure Stuart - I will look into this




On 3/10/2009 12:21 PM, Daniel Brown danbr...@php.net wrote:

 It works on my test server w php 5.2.6 but not at the main server w v 5.12
 
 Did you already have some output sent to the browser?  That may be
 causing header() not to be able to send the Location header to the
 browser properly.

Yes the page if a combo form / action page

Q: I might have learned something Does the: header('Location: xxx.php');
command need to be in the first php block? On some pages when I make multi
php blocks into 1 big one and put the header command inside it - it seems to
work better - is this true?

Q: Also, is it possible that extra whitespace inside the php block can cause
the header command to not work? (I might have that happening also - looking
into it) 


 
 Is there a way to get it to go to the other page (even with a different
 command/function) - or am I doing something wrong?
 
 Well, if the above is in fact the case (and yes, different
 versions and installations have been known to respond differently),
 then you can use a browser-based meta refresh, which will work for all
 browsers anyway:
 
 ?php
 //  your code
 header('Location: show.php');
 echo 'meta http-equiv=refresh content=0;show.php';
 flush();
 exit(0);
 ?


I tried refresh Daniel - and it worked great!

I even added a GET var to it - worked also

echo 'meta http-equiv=refresh content=0;show.php?id='.$_GET[id].'';

Thanks again folks!


 
 This kills three birds with the same stone like so:
 
 1.) It tries to use the header() location redirect.
 2.) It falls back on browser-based redirection.
 3.) It forces a flush() of the data to the client, regardless
 of minimum size limits.
 4.) It forces the script to exit with a non-error code of 0.





--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists 09]




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



[PHP] Setting Up A Web Subscription Service

2009-03-09 Thread revDAVE
Rather than reinventing the wheel  trying to set up a Web Subscription
Service from scratch - I imagine there must be a good selection of Web
Subscription Services, pre-made and maybe even open source apps (php/MySql
?) out there already. I'm not quite sure where to start looking however

The basic need is to manage :

- have customers sign up and get charged periodically - most likely monthly
- yearly etc.

- allow active members access to varied content pages.



--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists 09]




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



[PHP] Getting An Inventory Product Count

2009-02-27 Thread revDAVE
Newbie question

Hi folks,

Currently, I have an inventory table that stores individual records for each
single item in inventory - ( each item is on its own line because it has
serial numbers associated with it) like:

fields:

Item - ModelID - sn


item1 - 1 - sn xxx
item1 - 1 - sn xxx
item2 - 2 - sn xxx
item2 - 2 - sn xxx
item2 - 2 - sn xxx
item3 - 2 - sn xxx

Goal: I would like to give a report page with total counts for current in
inventory like: 

COUNTS...
item1 = 2
item2 = 3
item3 = 1

so I created a fool around query that gets a count for just ModelID = 1

$query_count_model1 = SELECT count(inventory_id) as thecount FROM inventory
WHERE ModelID = 1;

BUT: - the I'm sure there is some better way to get a count for *each* of
the ModelID that exist in any given time *all at once* in some kind of loop
or xxx???... I just don't know how do that...

(newbie alert) - I would appreciate any ideas or URL links etc. - please
keep is simple for this newbie




--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists 09]




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



[PHP] Get a list of column field names from a MS Access table

2009-02-26 Thread revDAVE
Newbie question:

I would like to get a list of column field names from a MS Access table and
hopefully get them returned in the ORIGINAL order (as they appear in access)

Is there a sql query I could do to get this result?




--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists 09]




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



[PHP] Having Trouble With Session Variable in Query Statement

2009-02-23 Thread revDAVE
Hi folks,

I'm trying to make an update query with a session variable...

It creates this error:

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting
T_STRING or T_VARIABLE or T_NUM_STRING in ...

Q: the session var shows ok on the page :
ID ?php echo $_SESSION['now_poid']; ?
- so how do I fix the error?

==

?php require_once('../Connections/dblink.php');
if(!session_id()) session_start();
$amt = 18;
$id1 = 8;
$_SESSION['thisid']=8;
$id2 = $_SESSION['thisid'] ;


  //these 3 work
$updateSQL =UPDATE `mytable` SET thetotal=$amt WHERE id=8;
$updateSQL =UPDATE `mytable` SET thetotal=$amt WHERE id=$id1;
$updateSQL =UPDATE `mytable` SET thetotal=$amt WHERE id=$id2; // uses
$_SESSION['thisid']

//but this does not..
$updateSQL =UPDATE `mytable` SET thetotal=$amt WHERE
id=$_SESSION['thisid'];

Q: How can I fix it?






--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists 09]




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



Re: [PHP] Having Trouble With Session Variable in Query Statement

2009-02-23 Thread revDAVE
On 2/23/2009 12:44 PM, Paul M Foster pa...@quillandmouse.com wrote:

 Don't single quote values inside array brackets when the whole
 expression is in double quotes. You've got:
 
 ... $_SESSION['thisid'];
 
 Do this instead:
 
 ... $_SESSION[thisid];


AHA - thanks much - that worked!



--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists 09]




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



Re: [PHP] Re: Simple Search Logic Issue...

2009-02-15 Thread revDAVE
On 2/15/2009 3:32 AM, David Robley robl...@aapt.net.au wrote:

 
 LIKE '%c%' will match a field containing 'c' anywhere
 
 If you are using that syntax, I'd suggest echoing your query to make sure
 that it is as it should be; I'm wondering if you are actually enclosing
 string values in single quotes in your query?

Thanks David for your help

The input form is basic like:

input name=Message type=text value=

Then dreamweaver cs3 created this

$mess_list1 = -1;
if (isset($_GET['Message'])) {
  $mess_list1 = $_GET['Message'];
}

... But it doesn't look like it does what you say : actually enclosing
string values in quotes

Maybe ?: 


$mess_list1 = '$_GET['Message']';
Not 
$mess_list1 = $_GET['Message'];
???

 
 As for multiple selection criteria, you need to test whether the passed in
 value is set or not, and only include set values in the query.

Not sure - but isn't that what this code is doing ...???


$mess_list1 = -1;
if (isset($_GET['Message'])) {
  $mess_list1 = $_GET['Message'];
}

 
 OT: sprintf syntax is so hard to read :-)

I agree - especially for this newbie...

--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists 09]




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



Re: [PHP] Re: Simple Search Logic Issue...

2009-02-15 Thread revDAVE
On 2/15/2009 3:32 AM, David Robley robl...@aapt.net.au wrote:

 If you are using that syntax, I'd suggest echoing your query to make sure
 that it is as it should be; I'm wondering if you are actually enclosing
 string values in single quotes in your query?


Another part of the dw cs3 code uses switch - that seems to do as you
mentioned...

if (!function_exists(GetSQLValueString)) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = ,
$theNotDefinedValue = )
{
  $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

  $theValue = function_exists(mysql_real_escape_string) ?
mysql_real_escape_string($theValue) : mysql_escape_string($theValue);


Here

  switch ($theType) {
case text:
  $theValue = ($theValue != ) ? ' . $theValue . ' : NULL;
  break;
etc.



--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists 09]




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



[PHP] Simple Search Logic Issue...

2009-02-14 Thread revDAVE
Newbie question...


I have a search page with multi lines of search criteria:

Name
Topic
Message
Etc...

I'm hoping to get results based on what criteria I type - but I'm not
getting what I expect. I think it's just getting results where in addition
to getting search criteria I type - ALSO none of the search fields can be
blank (not what I hoped) ...

Like I type just 'c' in the name field and it shows 3 records (other search
fields filled up) ... But I have many more records with name containing 'c'

Goal: to search for what I type in whatever search fields and not worry
about whether others are blank or not - like:

Name contains 'c'

Charles
Chuck
Chuck
Chas

Or 

Name contains 'c' and topic contains 'test1'

Maybe just charles fits this criteria

--


I made a simple results page,

... More code here ... ( DW CS3 )

$name_list1 = -1;
if (isset($_GET['Name'])) {
  $name_list1 = $_GET['Name'];
}
$top_list1 = -1;
if (isset($_GET['Topic'])) {
  $top_list1 = $_GET['Topic'];
}
$mess_list1 = -1;
if (isset($_GET['Message'])) {
  $mess_list1 = $_GET['Message'];
}
mysql_select_db($database_test1, $test1);
$query_list1 = sprintf(SELECT * FROM mytable WHERE Name LIKE %s and Message
LIKE %s and Topic LIKE %s ORDER BY mytable.id desc, GetSQLValueString(% .
$name_list1 . %, text),GetSQLValueString(% . $mess_list1 . %,
text),GetSQLValueString(% . $top_list1 . %, text));

--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists 09]




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



[PHP] Creating A Unique List With Table Query

2009-02-10 Thread revDAVE
Newbie question

Hi Folks,

I would like to be able to query a table, and return only the unique values
from a particular field. For example: to get all contents from the category
field from the contacts table:

Query = 

SELECT Category FROM contacts

But this will produce many duplicates.

Question : How do I filter the query to only produce unique values?
 
I was looking at: array_unique but I am not sure how to implement this in a
MYSql table query

Any help would be appreciated - thanks Dave



--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists 09]




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



Re: [PHP] Creating A Unique List With Table Query

2009-02-10 Thread revDAVE
On 2/10/2009 11:45 AM, Andrew Ballard aball...@gmail.com wrote:

 SELECT DISTINCT Category FROM contacts

Thanks folks - that was perfect!


On 2/10/2009 11:46 AM, Stephen stephe...@rogers.com wrote:

 Also, do you have a Category table?
 
No Stephen I don't.



--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists 09]




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



[PHP] Adding Records Capture The New Record ID

2009-02-07 Thread revDAVE
Newbie question...

Hi folks, 

Adding records  capture the new record ID:

In the past, if I added a new record from a form in a phonebook file as an
example,  I would use a web form to fill out the info,  and then add and
invisible text item that stored a random number in one of the unused
database fields.

Then, after I inserted the record -  I would do a quick query that would
retrieve the record ID by searching for the random number

Q: is there a better way to retrieve the record ID from the newly added
record?





--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists 09]




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



Re: [PHP] Adding Records Capture The New Record ID

2009-02-07 Thread revDAVE
On 2/7/2009 11:41 AM, Stuart stut...@gmail.com wrote:

 Then, after I inserted the record -  I would do a quick query that would
 retrieve the record ID by searching for the random number
 
 Ouch that's nasty!!
 
 Q: is there a better way to retrieve the record ID from the newly added
 record?
 
 Use an auto_increment field then, assuming MySQL you can use
 mysql_insert_id to get the ID of the last record inserted on a given
 connection.
 
 -Stuart

Thanks Stuart - it works great - so much Less Nasty!

BTW: as long as - mysql_insert_id is right after the insert statement - is
it 100% accurate - (in that no other insert from another user could get in
the middle of this)?



--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists 09]




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



[PHP] DB Comparisons

2009-02-05 Thread revDAVE
Hi Folks,

I¹m curious if there are any previous discussions / Articles / URL¹s that
compare the power and scalability of MySQL (with php) with other
technologies like MS sequel server oracle -  coldfusion etc

I imagine that most middleware like php / asp / coldfusion is relatively
good  fast - (let me know if one is better ).  Mostly I¹m concerned with
the speed and power of the backend database as to how it functions on an
enterprise scale ­ such as how many hits it can handle per hour ­ how many
users before it starts to slow down etc.


--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists 09]




Re: [PHP] Re: DB Comparisons

2009-02-05 Thread revDAVE
On 2/5/2009 1:03 PM, Nathan Rixham nrix...@gmail.com wrote:

Nathan - Thanks so much for your detailed info - much appreciated!


On 2/5/2009 1:19 PM, Robert Cummings rob...@interjinn.com wrote:

 Isn't Yahoo using PHP? I thought Facebook too? Doesn't seem like they
 moved away from a scripting language.

And BTW - it seems as though myspace.com still is using coldfusion. I wonder
what the backend db is?


--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists 09]




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



[PHP] Global Changes With Loop To Allow Nulls In A Table...

2009-01-27 Thread revDAVE
Hi Folks,

Newbie question

I have a mysql table with 100 fields, currently all do not allow nulls.
Rather than hand typing in phpMyAdmin, I would like a way to loop through
all fields and update them to allow nulls

My Beginning attempt needs help...


$i = 1;
while ($i = 100):

// how do I word this to just change whatever field we are on to allow
nulls?

$sql = 'ALTER TABLE `mytable` ?*update*? `'.$???WhatEverField??[$i].'`
?ALLOWNULL?;';

//mysql_query($sql);

$result = mysql_query($sql) or die(br /br / Could not renumber dB $sql
br /br / . mysql_error());


$i++;
endwhile;


Thanks in advance



--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists 09]




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



Re: [PHP] Global Changes With Loop To Allow Nulls In A Table...

2009-01-27 Thread revDAVE
Thanks so much for everyone's help!

I fooled with this and it was cool...

In the mysql client, do a SHOW CREATE TABLE tableName\G

And ultimately got it working with:


-

The MySQL syntax to alter a column is:

ALTER TABLE `table` MODIFY `column` BIGINT NOT NULL;

[ http://dev.mysql.com/doc/refman/5.1/en/alter-table.html ]

The sql statement

SHOW COLUMNSFROM `table`;

[ http://dev.mysql.com/doc/refman/5.1/en/show-columns.html ]

Thanks again


--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists 09]




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



[PHP] Newbie - is there a function similar to the sql 'like' comparison operator?

2008-05-08 Thread revDAVE
Newbie - is there a function similar to the sql 'like' comparison operator?

I would like to be able to compare 2 strings:

If $this ---*like or similar to*--- $that

That type of thing...


I know of this page:

http://us3.php.net/manual/sl/language.operators.comparison.php


But I don't see something 'like' or 'similar' to something else


--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists]




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



[PHP] Newbie select statement questions 'WHERE'

2008-04-23 Thread revDAVE
NEWBIE! I have some GET data coming from a previous search form.

How do I add the WHERE part ?

orig:

$query_get1 = SELECT p_First, p_id, p_Last, p_Lvl, p_Sel
FROM contacts;

--W / WHERE...???

$query_get1 = SELECT p_First, p_id, p_Last, p_Lvl, p_Sel
FROM contacts
WHERE p_First like $_GET['p_First'] or p_Last like $_GET['p_Last'];


I tried various things that make errors:
 
where p_First like '%$_GET['p_First ']%';
where p_First like .$_GET['p_First '].;
Etc...

How can I make this work?

--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists]




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



[PHP] Should This Newbie Learn From Dreamweaver?

2008-04-22 Thread revDAVE
First of all - I know this is an entirely subjective question, and I know
there's no single approach to learning this technology. I'm just looking for
a few hints from seasoned professionals basically whether Dreamweaver
verbose code (at least it looks like that to me at this beginning point) is
all 'needed  necessary'...

I have a background using ColdFusion, however I am new to php / mySQL.

I am caught between two learning approaches:

1 -  I know that generally, it is better to build my knowledge from the
'bottom up' - coding by hand from books and such etc. - and so far I have
been doing that with php and mySQL. Slowly I am getting there. Php is quite
powerful and impressive.

2 - Dreamweaver cs3 is pretty cool.  Creating recordsets -  dynamic data -
updating records etc. is pretty seductive it seems to work well.

A few questions:

One of my issues is that the Dreamweaver code that gets created seems quite
verbose and somewhat complex (like using switch  case in a simple query
listed below...), therefore even harder for this newbie to try to learn
from. My question is this:  Is this Dreamweaver code actually all
modern/necessary (vs a 'simple approach') - or is it way over the top?

Without getting too detailed:

- If in fact you folks say that most of the DW approach (for those that have
seen it) is  'necessary'  'the right way to do things' - then I will be
happy to use it and try to figure out some of its complexities . But, if you
think that DW is over the the top ('...I don't use all that suff - I do a
query in just a few lines!') ... then I'll just start with the 'bottom up -
code by hand - do it yourself simple approach'.

BTW: if anyone wants to see more DW code - email me off-list - I'll be happy
to send more examples... (I don't want to clog up this cool list)

BTW: I also tried a happy medium - simplifying the DW code - however that
will break its usefulness in DW - and other DW interface items stop working,
so I guess that's not an option right now.

Interested in your thoughts... Dave



Example get recordset query w DW:


?php require_once('../Connections/weblink.php'); ?
?php
if (!function_exists(GetSQLValueString)) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = ,
$theNotDefinedValue = )
{
  $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

  $theValue = function_exists(mysql_real_escape_string) ?
mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
case text:
  $theValue = ($theValue != ) ? ' . $theValue . ' : NULL;
  break;
case long:
case int:
  $theValue = ($theValue != ) ? intval($theValue) : NULL;
  break;
case double:
  $theValue = ($theValue != ) ? ' . doubleval($theValue) . ' :
NULL;
  break;
case date:
  $theValue = ($theValue != ) ? ' . $theValue . ' : NULL;
  break;
case defined:
  $theValue = ($theValue != ) ? $theDefinedValue :
$theNotDefinedValue;
  break;
  }
  return $theValue;
}
}

$colname_get_Recordset1 = -1;
if (isset($_SESSION['mem_id'])) {
  $colname_get_Recordset1 = $_SESSION['mem_id'];
}
mysql_select_db($database_weblink, $weblink);
$query_get_Recordset1 = sprintf(SELECT * FROM tbl_test WHERE mem_id = %s
ORDER BY mem_id ASC, GetSQLValueString($colname_get_Recordset1, int));
$get_Recordset1 = mysql_query($query_get_Recordset1, $weblink) or
die(mysql_error());
$row_get_Recordset1 = mysql_fetch_assoc($get_Recordset1);
$totalRows_get_Recordset1 = mysql_num_rows($get_Recordset1);
?!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
html xmlns=http://www.w3.org/1999/xhtml;
head
meta http-equiv=Content-Type content=text/html; charset=UTF-8 /
titleUntitled Document/title
/head

body
/bodyRemember
/html
?php
mysql_free_result($get_Recordset1);
?


--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists]




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



Re: [PHP] Alter Table newbie help needed ...

2008-04-21 Thread revDAVE
Jason  David,

Thanks so much for your help

BTW: to reiterate the problem: I guess it was not knowing to use the 'try1'
connection ( try1.ztest) - and used 'connect2' connection instead...

Error said : Table 'connect2.ztest' doesn't exist
(connect2 was some other one I set up for something else)

Q: Is there a way to insure that it uses the right connection ( try1 - not
connect2 )?


--



On 4/20/2008 1:41 PM, Jason Norwood-Young [EMAIL PROTECTED]
wrote:

 revDave - can we see a bit more of the code in one block and not broken
 up? Makes it a bit easier to see what you're doing.

Will do - check below...



On 4/20/2008 11:08 AM, David Giragosian [EMAIL PROTECTED] wrote:

 Is try1 the name of a database? The SQL syntax is
 databasename.tablename.fieldname.
Hmmm - looking below, maybe this is the DB name?

$database_try1

As you see below - I tried this, but it gave me errors

$result = mysql_query($sql,***$database_try1*** )

This also failed...

$sql = 'ALTER TABLE `test.ztest` ADD `new4` VARCHAR(50) NOT NULL;';
$result = mysql_query($sql)

  
 When you issue a query using mysql_query() you can explicitly indicate the
 connection (returned by mysql_connect()) to use as the second parameter, e.g.,
 mysql_query($sql_Statement, $returnedConnectionObject);
  
 HTH,
  
 David



Here's the orig post with some mods:


Connection called 'try1'...

?php
# FileName=Connection_php_mysql.htm
# Type=MYSQL
# HTTP=true
$hostname_try1 = 127.0.0.1:8889;
$database_try1 = test;
$username_try1 = test;
$password_try1 = test;
$try1 = mysql_pconnect($hostname_try1, $username_try1, $password_try1) or
trigger_error(mysql_error(),E_USER_ERROR);
?



=


?php

$sql = 'ALTER TABLE `ztest` ADD `newfield3` VARCHAR(50) NOT NULL;';

$result = mysql_query($sql) or die(no good dB $sql . mysql_error());

?

maybe it needs something like:?

$result = mysql_query($sql,***$database_try1*** ) - hmmm?

I get errors like this: Warning: mysql_query(): supplied argument is not a
valid MySQL-Link resource

--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists]




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



Re: [PHP] Alter Table newbie help needed ...

2008-04-21 Thread revDAVE
On 4/21/2008 2:04 PM, revDAVE [EMAIL PROTECTED] wrote:

 : Is there a way to insure that it uses the right connection ( try1 - not
 connect2 )?



- seems to be ok now with this new db selector line...

mysql_select_db($database_try1, $try1); // this new line


New ...
?php

$sql = 'ALTER TABLE `ztest` ADD `newfield3` VARCHAR(50) NOT NULL;';
mysql_select_db($database_try1, $try1);
$result = mysql_query($sql) or die(no good dB $sql . mysql_error());

?


Old - no

?php

$sql = 'ALTER TABLE `ztest` ADD `newfield3` VARCHAR(50) NOT NULL;';

$result = mysql_query($sql) or die(no good dB $sql . mysql_error());

?

--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists]




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



Re: [PHP] Alter Table newbie help needed ...

2008-04-20 Thread revDAVE
On 4/19/2008 2:37 PM, Jason Norwood-Young [EMAIL PROTECTED]
wrote:

 Might be obvious but you are doing mysql_query($sql);, right?

Hello Jason,

Thanks - Your idea worked well -  for a while - but then I ran into
trouble...

 I added : mysql_error() and it said:


Table 'connect2.ztest' doesn't exist

- so I guess it was not knowing to use the 'try1' connection ( try1.ztest) -
(connect2 was some other one I set up for something else)

I'm using Dreamweaver cs3 - maybe it's confused?

Q: Is there a way to insure that it uses the right connection ( try1 - not
connect2 )?


BTW: I tried `try1.ztest` but it didn't like that:

$sql = 'ALTER TABLE `try1.ztest` ADD `myfield2` VARCHAR(10) NOT NULL;';


--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists]




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



[PHP] Alter Table newbie help needed ...

2008-04-19 Thread revDAVE
Newbie - MAC - MAMP on port 8889

I have this connection to Mysql database called 'test'


Other Php stuff works ok but now I'm trying to alter the table (never did
that before...)



Connection called 'try1'...

?php
# FileName=Connection_php_mysql.htm
# Type=MYSQL
# HTTP=true
$hostname_try1 = 127.0.0.1:8889;
$database_try1 = test;
$username_try1 = test;
$password_try1 = test;
$try1 = mysql_pconnect($hostname_try1, $username_try1, $password_try1) or
trigger_error(mysql_error(),E_USER_ERROR);
?

The lines below don't error  but also don't do anything

I must be missing something here Right? Maybe it doesn't know to use
try1 connection? How do I add that?

?php
$sql = 'ALTER TABLE `ztest` ADD `myfield2` VARCHAR(10) NOT NULL;';
---or---
$sql = 'ALTER TABLE `ztest` RENAME TO `ztest2`;';

 ?





--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists]




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



Re: [PHP] newbie needs help with session variables

2008-04-19 Thread revDAVE
On 4/19/2008 2:20 PM, Rod Clay [EMAIL PROTECTED] wrote:

 Hi.  I'm still very new to php and still trying to learn the ropes.


...Blind leading the blind (I'm a newbie also but...)

Did you try...?

session_id()) 
session_start();

- - - - -
From: PHP: session_id - Manual
Location: http://us2.php.net/manual/en/function.session-id.php
- - - - -

session_id() is used to get or set the session id for the current session.

The constant SID can also be used to retrieve the current name and session
id as a string suitable for adding to URLs. See also Session handling.




- - - - -
From: PHP: session_start - Manual
Location: http://us2.php.net/manual/en/function.session-start.php
- - - - -

Description

bool session_start ( void )
session_start() creates a session or resumes the current one based on the
current session id that's being passed via a request, such as GET, POST, or
a cookie.

If you want to use a named session, you must call session_name() before
calling session_start().

session_start() will register internal output handler for URL rewriting when
trans-sid is enabled. If a user uses ob_gzhandler or like with ob_start(),
the order of output handler is important for proper output. For example,
user must register ob_gzhandler before session start.




 
 I'm working on some code now trying to set up a session and use session
 variables in different scripts, but I'm getting this message:
 
 *Warning*: Unknown: Your script possibly relies on a session side-effect
 which existed until PHP 4.2.3. Please be advised that the session
 extension does not consider global variables as a source of data, unless
 register_globals is enabled. You can disable this functionality and this
 warning by setting session.bug_compat_42 or session.bug_compat_warn to
 off, respectively. in *Unknown* on line *0
 
 *2 questions:
 
 1) I've turned on register_globals in all of my php.ini files and
 restarted the webserver, but I'm still getting this message.  Can anyone
 help me with this?
 
 2) I get the idea that one should NOT turn on register_globals, but, if
 I don't do this, how do I share session variables between scripts (and
 avoid this message)?
 
 Thanks for any help that anyone can provide.
 
 Rod Clay
 [EMAIL PROTECTED]
 *


--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists]




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



Re: [PHP] putting variables in a variable

2008-04-19 Thread revDAVE
On 3/28/2011 4:06 AM, Hulf [EMAIL PROTECTED] wrote:

 Hi,
 
 I am making and HTML email. I have 3 images to put in. Currently I have
 
 $body .=
 table
   tr
 tdimg src=\image1.jpg\/td
   /tr
 
   tr
 td/td
   /tr
 /table
 ;
 
 
 ideally I would like to have
 
 $myimage1 = image1.jpg;
 $myimage2 = image2.jpg;
 $myimage3 = image3.jpg;
 
 
 and put them into the HTML body variable. I have tried escaping them in
 every way i can think of, dots and slashes and the rest. Any ideas?


I'm just a newbie - but

I did something like this (non - html mail) ... If it helps...

I created this var called $thebody - then stuck it in the mail tag... And it
works

--


$thebody = 'This is a some info...

UserID#: '. $_SESSION['nowuser'].'
Company: '.$_SESSION['now_co'].'

Worker Info: '. $edit_result_row-getField('First').' '.
$edit_result_row-getField('Last').'

Thanks,

';

---
--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists]




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



Re: [PHP] Alter Table newbie help needed ...

2008-04-19 Thread revDAVE
On 4/19/2008 2:37 PM, Jason Norwood-Young [EMAIL PROTECTED]
wrote:

 Might be obvious but you are doing mysql_query($sql);, right?

Not so obvious to THIS newbie - now it works fine!

Thanks AGAIN!

 
 Also add a try catch around your mysql_query to check what's happening.


--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists]




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



[PHP] Importing / Adding Fields Into MySql From A List

2008-04-12 Thread revDAVE
Newbie question!

I have a list of field names from another database (not mysql) - like:

name
phone1
phone2
street
city
state
zip
info
etc (a bunch more fields)

Q: Is there a way I can add these to an existing empty/blank table?

I have phpMyAdmin and If there's a way add tables w / php - maybe that would
work also

If I can just get all the field names in the table as text fields - that
would be ok for now - then I can individually change the field type by hand
w phpMyAdmin...

BTW: What is the best field type for 'average' text (not large 'BLOBS')
like:

1 - Street address - maybe less than 255 characters
2 - Info field - maybe more than 255 characters

- (let's assume that user might want to search on the fields):

-text?
-char?
-TINYTEXT?
-mediumtext?
-varchar?
-longtext?

Q: Is there a url to read about the types?

I'm looking at these now but not quite sure ...

http://dev.mysql.com/doc/refman/5.1/en/char.html
http://dev.mysql.com/doc/refman/5.1/en/blob.html


--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists]




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



[PHP] LOGIN Endless Loop Problem - Newbie

2008-04-08 Thread revDAVE
Hi folks - Newbie Question here...

I'm using php with filemaker and api from http://fmwebschool.com I am asking
them also for help (nothing yet) - but I thought that here would also be a
great place to ask:

Thread listed here for easier reading...
http://fmwebschool.com/frm/index.php?topic=2234.0

---

Start with question:

*Q: Can someone show me how to solve the endless loop problem that Only
Happens : *if you type a BAD LOGIN and it asks you to do it again - and then
you do a successful login*


---

Sorry for this verbose thread...

My Login Setup:

Normally: FMWS login is set so after a successful login - you will go to the
page you started from (that needed a login).

Currently I have things set so: after a login - before it goes to the page
you started from - ** it will first go to VARS.PHP and set some session
variables *** - then go to the final destination


*PROBLEM: Somehow it all works - EXCEPT if you type a BAD LOGIN and it asks
you to do it again - and then user types a successful login then:

*It gets STUCK in an *Endless Loop* and the browser says:

Too many redirects occurred trying to open ³http://127.0.0.1/nm/vars.php².
This might occur if you open a page that is redirected to open another page
which then is redirected to open the original page.

I'm still confused by this issue...

*Q: Can someone show me how to solve the endless loop problem that Only
Happens : *if you type a BAD LOGIN and it asks you to do it again - and then
you do a successful login*


1 ==MY LOGIN PAGE:


?php
$_SESSION['login_from'] = 'client.php';
require_once('FileMaker/FMStudio_Tools.php');

if(!session_id()) session_start();
if( isset($_SESSION['login_from'])  $_SESSION['login_from'] != 'vars.php'
) {
$_SESSION['orig_login_from'] = $_SESSION['login_from'];
}else{
   //$_SESSION['orig_login_from'] = 'client.php';
}
$_SESSION['login_from'] = 'vars.php';

$_GET[errorMsg] = fmsPerformLogin();
// FMStudio v1.0 - do not remove comment, needed for DreamWeaver support ?


ALSO set like FMWS basic login - it goes to itself:
form id=login_form name=login_form method=post action=

etc..


2 === MY VARS.PHP PAGE


... code set some variables


?php
if(!session_id()) session_start();

if($_SESSION['orig_login_from'] != vars.php)
{ fmsRedirect($_SESSION['orig_login_from']);}
else
{ fmsRedirect('client.php');}

?


3 =FMStudio_Tools.php... (UNTOUCHED BY ME)

function fmsPerformLogin() {
   if(!session_id()) session_start();
   fmsCheckLogout();
   if(isset($_POST['login_user'])) {
  $user = fmsPOST('login_user');
  $pass = fmsPOST('login_pass');
  if($user == '' || $pass == '') return 'User Name or Password cannot be
blank';
  $conn = $_SESSION['login_conn'];
  if(isset($_SESSION['login_from'])  $_SESSION['login_from'] != '') {
 $from = $_SESSION['login_from'];
  }else if(isset($_POST['defaultURL'])  $_POST['defaultURL'] != '') {
 $from = $_POST['defaultURL'];
  }else{
 $from = 'index.php';
  }
  if(isset($_SESSION['login_type'])  $_SESSION['login_type'] ==
'table') {
 $_SESSION[$conn.'_tableLogin'] =
array('user'=$user,'pass'=$pass,'first'=true);
  }else{
 $_SESSION[$conn.'_login'] =
array('user'=$user,'pass'=$pass,'first'=true);
  }
  session_write_close();
  header('Location: '.$from);
  exit();
   }
   if(isset($_GET[errorMsg])  $_GET[errorMsg] != '') {
  return $_GET[errorMsg];
   }else{
  return '';
   }
}



--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists]




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



[PHP] Newbie - Undefined Index Variable

2008-03-07 Thread revDAVE
I have this:

?php if (trim($_SESSION['nowtoctype']) == 'thistype')

{print 'a href=page1.phppage1/a';}else{print 'a href=
page2.phppage2/a';} ?

I will get the error:

Notice: Undefined index: nowtoctype in ...

If the variable has not yet been defined...

Is there a way to check if this var is already defined? ... (and then I can
define it - if not)



--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists]




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



[PHP] PHP Newbie List

2008-02-26 Thread revDAVE
Rather than bug folks on this cool list for beginner questions - does anyone
know of a good PHP Newbie email List?

--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists]

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



[PHP] Date Calculation Help

2007-06-30 Thread revDAVE
I have segmented a year into four quarters (3 months each)

nowdate = the month of the chosen date (ex: 5-30-07 = month 5)

Q: What is the best way to calculate which quarter  (1-2-3 or 4) the chosen
date falls on?

Result - Ex: 5-30-07 = month 5 and should fall in quarter 2



--
Thanks - RevDave
[EMAIL PROTECTED]
[db-lists]

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



[PHP] Novice Question - Viewing Errors

2007-06-19 Thread revDAVE
I am just beginning to learn about PHP.

It seems as though if I make a code error... The PHP page will simply come
up blank. ( Not too helpful for error checking) -  I would like to see some
kind of report on the page as to what went wrong.

 I have tried adding various lines of code to my page - from the link below
-  however I still get a blank page when errors occur...

display_errors(1);
error_reporting (E_ALL);
Etc

 I have read that possibly the errors are being sent to kind of error log -
rather than the page?

Q: How can I get the error reporting show up on the page so I can see it?

- - - - -
From: PHP: Error Handling and Logging Functions - Manual
Location: http://www.php.net/manual/en/ref.errorfunc.php
- - - - -

XXXIII. Error Handling and Logging Functions




--
Thanks - RevDave
[EMAIL PROTECTED]
[db-lists]

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



[PHP] Creating 'Previous - Next Buttons' Logic - Novice Question

2007-06-15 Thread revDAVE
Novice Question: I would like to create a set of pages that could use some
kind of logic to have previous - next buttons so that when the button was
clicked it would automatically go to the next page - or the previous page.

I know very little about PHP ...  however, I am hoping that there is some
kind of preset  open source php code that I might be able to use.

I can envision something like this:

- An 'include page' that might store an array of the list of pages such as:


start array...

pos1 = page1.htm
pos2 = page17.htm
pos3 = page5.htm
etc.

stop array...

- then  a variable could be set for the current page such as:


thispage = 2  - Place on the array equals position 2 (page17.htm)


then the next button would  add 1 to the current place on the array- (pos3)


-  and the previous button would be minus 1 place on the array - (pos1)

... that type of thing

Q:  Is there any open source code template that I can check out like this?




--
Thanks - RevDave
[EMAIL PROTECTED]
[db-lists]

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



[PHP] Setting Up A Simple Shopping Cart

2007-05-17 Thread revDAVE
Hello folks, 

I am a PHP NEWBIE. 

- I have the following three choices for shopping carts on my server:

CubeCart
OS Commerce
Zen Cart

Q: Does anybody have any preferences for creating a simple store?



--
Thanks - RevDave
[EMAIL PROTECTED]
[db-lists]

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



Re: [PHP] Setting Up A Simple Shopping Cart

2007-05-17 Thread revDAVE
On 5/17/2007 7:05 AM, revDAVE [EMAIL PROTECTED] wrote:

 Hello folks, 
 
 I am a PHP NEWBIE.
 
 - I have the following three choices for shopping carts on my server:
 
 CubeCart
 OS Commerce
 Zen Cart
 
 Q: Does anybody have any preferences for creating a simple store?

Both OS Commerce  Zen Cart look pretty cool so far   Does anyone have
any preferences?




--
Thanks - RevDave
[EMAIL PROTECTED]
[db-lists]

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



[PHP] Newbie Question - Form To Email Needed

2007-05-04 Thread revDAVE
 Hi folks, 

I have a form on page one - and would like to submit to a second page in PHP
that could grab the fields and send it out as an e-mail.

Are there any links that show how do this?


Thanks in advance - Dave


--
Thanks - RevDave
[EMAIL PROTECTED]
[db-lists]

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



Re: [PHP] Newbie Question - Form To Email Needed

2007-05-04 Thread revDAVE
On 5/4/2007 7:29 PM, Brad Sumrall [EMAIL PROTECTED] wrote:

 Where are the fields?


Hi Brad,


Just a basic form with a few fields inside like - name - address etc lie:



form action=sendmail.php method=post
input name=name type=text
input name=email type=text
/form

--
Thanks - RevDave
[EMAIL PROTECTED]
[db-lists]

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



Re: [PHP] Newbie Question - Form To Email Needed

2007-05-04 Thread revDAVE
On 5/4/2007 7:40 PM, Brad Sumrall [EMAIL PROTECTED] wrote:

 Once again my friend,
 Where are the fields?
 There physical 411?
 Database?
 Incoming email?
 Out going email?
 Flat file?


Hello Brad, 

I apologize if I not being clear enough, - I was thinking that there would
simply be a basic Web-Page (page 1) with EMPTY input fields ( that are not
tied to a data source at all) on a form so that the user could fill it out -
click the submit button - and it could go to a second page (PHP) -  that can
process the incoming fields and send an email to an email address...


PAGE 1: Just a basic web page form with a few fields inside like - name -
address etc:

form action=sendmail.php method=post
input name=name type=text
input name=email type=text
/form


PAGE 2: ... Some kind of PHP sendmail function...

- this is the way I would do it in ColdFusion ( simply going from page 1 to
page 2 that would send an email e-mail (with no database needed))


cfmail 
to=[EMAIL PROTECTED]
from=somebody
server=mail.domain.com
subject=Some mail

Name is: #form.name#
Email is : #form.email#

Thanks, 
US
/cfmail

Q: is there some kind of mail command like this for PHP?



 
 Brad
 
 -Original Message-
 From: revDAVE [mailto:[EMAIL PROTECTED]
 Sent: Friday, May 04, 2007 10:36 PM
 To: php-general@lists.php.net
 Cc: Brad Sumrall
 Subject: Re: [PHP] Newbie Question - Form To Email Needed
 
 On 5/4/2007 7:29 PM, Brad Sumrall [EMAIL PROTECTED] wrote:
 
 Where are the fields?
 
 
 Hi Brad,
 
 
 Just a basic form with a few fields inside like - name - address etc lie:
 
 
 
 form action=sendmail.php method=post
 input name=name type=text
 input name=email type=text
 /form
 
 --
 Thanks - RevDave
 [EMAIL PROTECTED]
 [db-lists]
 
 
 
 
 
 
 


--
Thanks - RevDave
[EMAIL PROTECTED]
[db-lists]

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



[PHP] Novice PHP Question - Listing Folder Contents

2007-04-10 Thread revDAVE
I apologize in advance, however I know almost nothing about PHP - ( but I am
trying to learn now)...

 I am wondering if it is possible to create a PHP page that can:

1 - Get the contents of everything in its own folder at the same level (
just list sub folders filenames - not their contents)

2 - List/ display the contents on the same Web-page

Q:  I'm sure this is most likely doable - but I sure could use some help -
any ideas how to do this?


Example list:


file1.php
file2.php
file22.txt
file1.pdf


- that sort of thing


--
Thanks - RevDave
[EMAIL PROTECTED]
[db-lists]

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



Re: [PHP] Novice PHP Question - Listing Folder Contents

2007-04-10 Thread revDAVE
On 4/10/2007 1:13 PM, Tijnema ! [EMAIL PROTECTED] wrote:

 http://www.php.net/manual/en/function.scandir.php
 
 
 2 - List/ display the contents on the same Web-page
 
 http://www.php.net/manual/en/function.file-get-contents.php

WOW COOL - That was quick - thanks Tijnema  Brad!


From here: 
http://us.php.net/manual/en/function.scandir.php

I created a folder on a site called 'test'
- inside that I created a folder called 'tmp' and put a few small files in
there - test1.php and test1.pdf

- inside the 'test' folder - I put a page with this code in it:


---START--

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
html xmlns=http://www.w3.org/1999/xhtml;
head
meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1 /
titleUntitled Document/title
/head

body

?php
$dir= '/tmp';
$files1 = scandir($dir);
$files2 = scandir($dir, 1);

print_r($files1);
print_r($files2);
?

/body
/html


--- END 
I believe I'm using php 5.xx and other simple php code tests works ok...

What did I do wrong?


* It returned this:


Array ( [0] = . [1] = .. [2] =
20070319-203422-202.180.53.58-request_body-cIifAH [3] =
20070331-205545-210.151.155.75-request_body-ndb6cr [4] =
20070407-120415-74.120.199.72-request_body-e04f0i [5] = cpbandwidth [6] =
horde_32001.log [7] = impatt8G6tEI [8] = impattnZ83wN [9] = mysql.sock
[10] = sess_081964a8e938ed5ce96599ca69c3735f [11] =
sess_0a68937c12c590e4e888729a6f3b3909 [12] =
sess_196a3d41dcf968745b769fd0cc109027 [13] =
sess_1d76fbb6d9a20281764dd704d7b3b42b [14] =
sess_1df95e42d90db2a3b56b01b13418436f [15] =
sess_251f03b20e722badf7f50b79bdf2d658 [16] =
sess_2c6ca7e9f66fdec29eec68eb82b1af74 [17] =
sess_372c43405de9f29c9f7da7e2f744b76b [18] =
sess_3ec91e33b50ba9907a5c5a1708536e72 [19] =
sess_3f53f2e40741897d8bf2221e1654ffe4 [20] =
sess_57cb8a894f1ffb0e401b4f056aef72e1 [21] =
sess_57fff08ce0f8e04aa5bdf951beac4a09 [22] =
sess_60d24ab7ad329193f4c0a86b8523d620 [23] =
sess_62b717b4d1cb02a212d069bbda572537 [24] =
sess_643b41e3f4cbcddff8691733ec5ced73 [25] =
sess_73954a8cdafc3ec27e100334f41f4687 [26] =
sess_96b7e378fbe36ef9dd0d6971f055f1f4 [27] =
sess_a4924e20ddf793e3b105f8e571fcb8f9 [28] =
sess_ab4f0779de0d62ffdb663e2e5fa0e545 [29] =
sess_b10ba9bb132e6b7e595e5dd6534456c7 [30] =
sess_b509845b62cd47325f7e87da19950c8f [31] =
sess_ce336da97e49a065da7a1e17f67905fe [32] =
sess_cee73725b4740fd4a71007acc415e315 [33] =
sess_d93ffa5f105f1f1be98c8d25d507d4d2 [34] =
sess_db0673c8f47533b927ebd220b158b9a6 [35] =
sess_db6015a1a82369de458bea63790dd2a7 [36] =
sess_ea54cce4bee772eca9d051b9665ad767 [37] =
sess_fc8499d1de617bfd49f3ed6a64a55dfe ) Array ( [0] =
sess_fc8499d1de617bfd49f3ed6a64a55dfe [1] =
sess_ea54cce4bee772eca9d051b9665ad767 [2] =
sess_db6015a1a82369de458bea63790dd2a7 [3] =
sess_db0673c8f47533b927ebd220b158b9a6 [4] =
sess_d93ffa5f105f1f1be98c8d25d507d4d2 [5] =
sess_cee73725b4740fd4a71007acc415e315 [6] =
sess_ce336da97e49a065da7a1e17f67905fe [7] =
sess_b509845b62cd47325f7e87da19950c8f [8] =
sess_b10ba9bb132e6b7e595e5dd6534456c7 [9] =
sess_ab4f0779de0d62ffdb663e2e5fa0e545 [10] =
sess_a4924e20ddf793e3b105f8e571fcb8f9 [11] =
sess_96b7e378fbe36ef9dd0d6971f055f1f4 [12] =
sess_73954a8cdafc3ec27e100334f41f4687 [13] =
sess_643b41e3f4cbcddff8691733ec5ced73 [14] =
sess_62b717b4d1cb02a212d069bbda572537 [15] =
sess_60d24ab7ad329193f4c0a86b8523d620 [16] =
sess_57fff08ce0f8e04aa5bdf951beac4a09 [17] =
sess_57cb8a894f1ffb0e401b4f056aef72e1 [18] =
sess_3f53f2e40741897d8bf2221e1654ffe4 [19] =
sess_3ec91e33b50ba9907a5c5a1708536e72 [20] =
sess_372c43405de9f29c9f7da7e2f744b76b [21] =
sess_2c6ca7e9f66fdec29eec68eb82b1af74 [22] =
sess_251f03b20e722badf7f50b79bdf2d658 [23] =
sess_1df95e42d90db2a3b56b01b13418436f [24] =
sess_1d76fbb6d9a20281764dd704d7b3b42b [25] =
sess_196a3d41dcf968745b769fd0cc109027 [26] =
sess_0a68937c12c590e4e888729a6f3b3909 [27] =
sess_081964a8e938ed5ce96599ca69c3735f [28] = mysql.sock [29] =
impattnZ83wN [30] = impatt8G6tEI [31] = horde_32001.log [32] =
cpbandwidth [33] = 20070407-120415-74.120.199.72-request_body-e04f0i [34]
= 20070331-205545-210.151.155.75-request_body-ndb6cr [35] =
20070319-203422-202.180.53.58-request_body-cIifAH [36] = .. [37] = . )





--
Thanks - RevDave
[EMAIL PROTECTED]
[db-lists]

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



Re: [PHP] Novice PHP Question - Listing Folder Contents

2007-04-10 Thread revDAVE
Thanks to ALL ... Brad - Tijnema - TG - Richard and JMG!

With a little fooling around - I actually got exactly what I wanted!!!

Boy that was fun!

And thanks for the incredibly quick responses!



--
Thanks - RevDave
[EMAIL PROTECTED]
[db-lists]

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



[PHP] Matching Proper Versions Of PHP and MySQL

2007-03-05 Thread revDAVE
Hello All,

I'm a newbie.

My server just upgraded to PHP version 5.1.2 from php 4.3.11

MySQL currently is v 4.0.27


Q: What is the oldest - best/safest version of mySQL to use with PHP version
5.1.2.? The reason I mentioned the oldest - is because, for legacy clients,
I would like to do the minimum upgrade to ensure best compatibility with
legacy code ( mySQL and NON php etc.). If it is OK to stay on mySQL version
4.0.27  ... That would be good to know.

Q: Is PHP version 5.1.2 -  relatively  stable  version of PHP 5?




--
Thanks - RevDave
[EMAIL PROTECTED]
[db-lists]

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



[PHP] Nubie scripting question

2004-09-19 Thread revDAVE
 I would like to set up a situation where I have one  main page with a bunch
of thumbnail pictures on it.  Each will have a link to a larger photo.
However, rather than just simply  loading a raw JPEG to a blank page, I
would like to use PHP, so that each link will point to 1 main php display
page - that I can program to look nice and display  all the images from this
one page - one at a time - of course.

So - the thumbnail links would look something like this:


a href=http://www.mydomain.com/display.php?pic=pic1.gif; img
src=pic1thumb.gif alt=deals/a


This URL addition: ?pic=pic1.gif  (will carry the name of the picture to be
loaded)

Q: here is what I am unclear of: since I do not know PhP -  how do I get the
main display page to read this part of the URL?

img src=??? Url.pic ??? alt=deals - how do I write this?

 thanks  in advance for your help



--
Thanks - RevDave
[EMAIL PROTECTED]
[db-lists]

Check out some great Domain Names at:
http://www.domains4days.com

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



[PHP] Novice PHP Variable/Link Question

2004-09-16 Thread revDAVE
How can I use a PHP variable as the destination for a link?

? $mylink = 'thispage.htm'

a href=thispage.htmgo here/a

With var...? How do I write this?

a href=??? $mylink ???go here/a

?

--
Thanks - RevDave
[EMAIL PROTECTED]
[db-lists]

Check out some great Domain Names at:
http://www.domains4days.com

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



Re: [PHP] Novice PHP Variable/Link Question

2004-09-16 Thread revDAVE
On 9/16/04 3:01 PM, Greg Donald [EMAIL PROTECTED] wrote:

 
 a href=?php echo $url;??php echo $url;?/a
 
 


It  worked great - thanks a lot.
--
Thanks - RevDave
[EMAIL PROTECTED]
[db-lists]

Check out some great Domain Names at:
http://www.domains4days.com

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