[PHP] Re: Scripts for customer - service provider web available?

2004-03-10 Thread DAvid Jackson
Denis L. Menezes wrote:
Hello friends.

I am in a hurry to make a website where suppliers can advertise their
products and services and customers can place their requirements so the
requirements can be matched with the service providers.
Also vistors should be able to seek suppliers and customers.
Can anyone tell me where I could find a ready made scripts program that does
the above?
Thanks
denis
http://freshmeat.net

David

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


[PHP] Are $_POST and $_GET interchangable?

2004-03-10 Thread DAvid Jackson
I understand the difference between how they process from data.
Most application seem to reply on $_GET which display the 
session/from/cookie values in the URL windows.

What I'm not clear on are there times when you have to either $_POST or 
$_GET?

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


[PHP] SQLite Support is library call?

2004-03-03 Thread DAvid Jackson
Howdy --
SQLite supported by  a direct call the sqlite library?
As apposed to calling the executable?
Could I use ini_set(include_path=) to tall PHP where the SQLite lib is 
located?

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


Re: [PHP] Re: why use safe mode?

2004-03-03 Thread DAvid Jackson
Joel Boonstra wrote:
This tread inerest me because I faced with a situation, where I have to 
work around don't having a database (out of my control).

What I want to do is use Pear + sqlite.so out of home directory of the 
home dir.(typical L.A.P vhost)?

I is modifying safe_mode relative directives the best/only option:
inlcude_path=/home/username/lib:/home/user/www
safe_mode_exec_dir=/home/username/lib
TIA,
David
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: why use safe mode?

2004-03-03 Thread DAvid Jackson

TIA,
David
Please read for content... and excuse the crapping spelling

DJJ

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


[PHP] Testing Pear install

2004-03-03 Thread DAvid Jackson
How can I test to see if and what portions of Pear are installed on a 
vhosted website?

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


Re: [PHP] Re: why use safe mode?

2004-03-03 Thread DAvid Jackson
Chris W. Parker wrote:
DAvid Jackson mailto:[EMAIL PROTECTED]
on Wednesday, March 03, 2004 11:20 AM said:

TIA,
David
Please read for content... and excuse the crapping spelling

DJJ


??
Chris --
See reply to this thread right before this, I fat fingered it :)
And also the questions I asked .
TX,
david
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Testing Pear install

2004-03-03 Thread DAvid Jackson
Ben Ramsey wrote:

 You can download the PEAR packages yourself, though, drop them into a 
directory in your site (or outside the root of your site), and use 
ini_set() to set your include_path to the directory where your PEAR 
classes reside.  Then you can use PEAR without having to install it.
Ben --
It's looks like that's what I'm going to have to do :-(
My church made a poor decision, about which hosting company to go with
Tx,
David
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] [4.3.4] Building with sqlite support

2004-03-03 Thread DAvid Jackson
I looked the the configure --help but didn't see sqlite?
Or did I just miss it? How can I build the module for sqlite.
David

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


[PHP] HELP with headers already being sent error?

2004-02-25 Thread DAvid Jackson
Howdy --
header already send error.
Cannot modify header information - headers already sent by (output
started at /u242/rumc1636/warehouse/scrapbook/config.php:8) in 
/u242/rumc1636/warehouse/scrapbook/login.php on line 47 and 48.

Here's lines 42 is if($action == login)
Could it be related to the form actons i.e. Should that be a $PHP_SELF 
tingie?
form action=login.php method=post

Finaly, plese note this code isn't mine, i'm just trying to tweak it 
alittle.

TIA,
David
-- open of config.php: Lines 1-8 

!DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
html
head
  meta content=text/html; charset=ISO-8859-1
 http-equiv=content-type
titleRUMC Youth Ministry/title
/head
?
--- Login.php
$errors = ;
require config.php;
if($action == logout){

   $query = UPDATE scrapbook_users set loggedin='N' Where 
recno='$myuser';
   $mydatabase-sql_query($query);
   if($logins  6){
 $query = UPDATE scrapbook_config set logins='3';
 $mydatabase-sql_query($query);
   }
   setcookie(mypass,, time() - 3600);
   setcookie(myuser,, time() - 3600);
   $query = UPDATE scrapbook_config set loggedin='N';
   $mydatabase-sql_query($query);
   print You have been logged out;?
br
 SCRIPT
 function gothere(){
 	window.parent.location.replace(index.php?section=?= $recno ?);
 	}
 setTimeout(gothere();,200);
 /SCRIPT
 ?
  print a href=index.php?section=$recno target=_topif you are still 
here reading this click this link/abrbrbr;

   exit;
}
if($action == login){
 $loginok = false;
 $myusername = strtolower($myusername);
 if(($myusername == admin)  ($mypassword == $password_admin_t)){
   $loginok = true;
   setcookie(myuser,admin);
   setcookie(mypass,$mypassword);
   $logins++;
   $query = UPDATE scrapbook_config set loggedin='Y',logins='$logins';
   $mydatabase-sql_query($query);
 } else {
   $query_d = SELECT * FROM scrapbook_users WHERE 
myusername='$myusername' AND mypassword='$mypassword';
   $myrow_d = $mydatabase-select($query_d);
   if(count($myrow_d) != 0){
  $loginok = true;
  $myrow = $myrow_d[0];
  setcookie(myuser,$myrow[recno]);
  setcookie(mypass,$mypassword);
  $query = UPDATE scrapbook_users set loggedin='Y' WHERE 
recno='$myrow[recno]';
  $mydatabase-sql_query($query);
   }
 }

 if($loginok == true){
   print You have been Logged In;
   ?
 br
 SCRIPT
  function details(theURL,winName,features) {//v1.0
window.open(theURL,winName,features);
  }
  function gothere(num){
if(num  5){
  window.parent.location.replace(index.php?section=?= $recno ?);
} else {
   document.mine.submit();
   setTimeout(gothere(2);,200);
}
  }
 setTimeout(gothere(?= $logins ?);,600);
 /SCRIPT
 FORM ACTION=http://craftysyntax.com/myscrapbook/abouts.php 
Method=GET name=mine TARGET=_blank
 input type=hidden name=v value=?= $version ? 
 input type=hidden name=p value=?= $Processor ? 
 /FORM
 ?
  print a href=index.php?section=$recno target=_topif you are still 
here reading this click this link/abrbrbr;

   exit;
 } else {
  $errors = Invalid Password or username;   
 }
}   
if ($tablewidth == ){
 $tablewidth = 250;
}
if ($section == ){
 $section = thoughts;
}
if ($page == ){
 $page = 1;
}
$nextpage = $page + 1;
// HTML
// HEAD
//   TITLELog in/TITLE
// /HEAD
?

link REL=stylesheet HREF=style.css TYPE=text/css
body bgcolor=00 Background=images/bkbook.gif bgcolor=ff 
text=664411 link=996633 vlink=996633 marginheight=0 marginwidth=0 
topmargin=0 leftmargin=0 

brbr

form action=login.php method=post
input type=hidden name=action value=login
center
table width=500trtd
Logging in gives you greater permissions to ADD/EDIT/VIEW chapters of this
scrapbook.br
If do not have a user account please send a email to  :a 
href=[EMAIL PROTECTED]The Youth Cordinator/a
PLEASE VISIT THE SUPPORT PAGE

/td/tr
/table
br
?
if ($errors != ){
print brfont color=99 $errors /font ;
}
?
SCRIPT
function details(theURL,winName,features) {//v1.0
   window.open(theURL,winName,features);
}
// onmouseovers
r_about = new Image;
h_about = new Image;
r_about.src = 'images/about_pro.gif';
h_about.src = 'images/about_pro2.gif';
r_about2 = new Image;
h_about2 = new Image;
r_about2.src = 'images/about_web.gif';
h_about2.src = 'images/about_web2.gif';
/SCRIPT
table width=500trtd colspan=2 bgcolor=cc9966 align=center
table width=98% bgcolor=EE Background=images/bkbook.gif
tr bgcolor=EE Background=images/bkbook.giftd align=right 
bgcolor=EE 
Background=images/bkbook.gifbUsername:/b/tdtdinput type=text 
size=20 name=myusername value=? echo $myusername; ?/td/tr
tr bgcolor=EE Background=images/bkbook.giftd align=right 
bgcolor=EE 
Background=images/bkbook.gifbPassword:/b/tdtdinput 
type=password size=20 name=mypassword value=? echo $mypassword; 
?/td/tr
tr bgcolor=EE Background=images/bkbook.giftd colspan=2 
bgcolor=EE Background=images/bkbook.gif align=center
a 

[PHP] Re: Variables

2002-11-03 Thread David Jackson
Bryan McLemore wrote:

What is a variables value before said value has been assigned a value?

Thanks
Bryan



Wouldn't it be null or empty  ?

Just a guess,
David



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




[PHP] radio buttons from MySQL query?

2002-11-03 Thread David Jackson
How do I go about building radio buttons using the results of a MySQL 
query. The record layout looks like this:

acct
cat
description

I want to use acct as the value=acct in the input statement for the 
radio box. The code below almost works?

TIA,
David


?php
$header = mysql_query (SELECT * FROM chart
   ORDER BY acct );

if ($row = mysql_fetch_array($header)) {
do {
print(tr  bgcolor=\white\ );
   print 'td width=5input type=radio name=gl_acct 
value=acct[]/td';
   print(td width=\12\);
   print $row[acct];
print /tdtd width=\12\;
   print $row[cat];
print /tdtd ;
   print $row[descript];
   print(/td/tr\n);
   } while($row = mysql_fetch_array($header));

} else {print Sorry, no records were found!;}


?


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



Re: [PHP] radio buttons from MySQL query?

2002-11-03 Thread David Jackson
OK, this works but there has to be a pretty way?
John, I'm not sure what you mean about the while loop?


David

- Works -

html
headtitleOperation Sticky Bun/title/head
body
h3 align=centerOperation Sticky Bun /h3
?php require('connect.php'); ?
?php
print 'form action=hello.php method=post';
$header = mysql_query (SELECT * FROM chart
   ORDER BY acct );
if ($row = mysql_fetch_array($header)) {
do {
   print 'input type=radio name=ledger_acct value=';
   print $row[acct];print '';
   print $row[descript];print 'br';
   } while($row = mysql_fetch_array($header));

} else {print Sorry, no records were found!;}

print '/form';
?
/body
/html




Rija wrote:

oups ... you're right !

- Original Message -
From: John Nichel [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: php [EMAIL PROTECTED]; David Jackson
[EMAIL PROTECTED]
Sent: Monday, November 04, 2002 2:57 PM
Subject: Re: [PHP] radio buttons from MySQL query?




There is no reason to put brackets behind the name of the radio element.


The brackets are neccessary for multi-select elements like checkboxes, but
radio buttone are a single select element.


Your if statement should be a while loop.

I'm sure you don't want to set this ( value=acct[] ) as the value for each


radio button.  Do it that way, and no matter which one is picked, it will be
the same value.


rija wrote:


I don't think so,
Put the bracket with your radio's name not with your the value///

For example :
print td width=2input type=radio name=gl_acct[]
value=$row['acct']{$row['acct']}/td ...
and so one/

- Original Message -
From: David Jackson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, November 04, 2002 1:15 PM
Subject: [PHP] radio buttons from MySQL query?





How do I go about building radio buttons using the results of a MySQL
query. The record layout looks like this:

acct
cat
description

I want to use acct as the value=acct in the input statement for the
radio box. The code below almost works?

TIA,
David


?php
$header = mysql_query (SELECT * FROM chart
  ORDER BY acct );

if ($row = mysql_fetch_array($header)) {
   do {
   print(tr  bgcolor=\white\ );
  print 'td width=5input type=radio name=gl_acct
value=acct[]/td';
  print(td width=\12\);
  print $row[acct];
   print /tdtd width=\12\;
  print $row[cat];
   print /tdtd ;
  print $row[descript];
  print(/td/tr\n);
  } while($row = mysql_fetch_array($header));

   } else {print Sorry, no records were found!;}


?


--
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] ereg (Why, Does sort of work)?

2002-11-02 Thread David Jackson
I'm comparing the values of a check box, against another form field, and 
it sort of works, but I don't understand why (A better solution? is 
listed below it?

TIA,
David Jackson

---
And part of the HTML Form:
---
tdbAccount Type:/b/td
tdAsset/tdtdinput type=radio name=transid value=1000/td
tdLiability/tdtdinput type=radio name=transid value=2000/td

input type=text name=coa_acct size=5 maxlength=5

--
Here's the one that's puzzling me:
--
if ( ereg(^1,$_POST['transid'])== ereg(^1,$_POST['coa_acct'])):
echo $_POST['coa_acct'];
else :
echo Get off you Asset!;
exit;
endif;

---
The better solution using substrings?
---
if ( substr($_POST['transid'],0,1)== substr($_POST['coa_acct'],0,1)):
echo $_POST['coa_acct'];
else :
echo Get off you Asset!;
exit;
endif;




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



[PHP] Re: need help with project

2002-11-02 Thread David Jackson
Karl --
Before you go reinventing the wheel , you might check 
http://freshmeat.net ... of course there is nothing actually wrong with 
 reinventing the wheel *grin*

David Jackson

Karl James wrote:
Hello people
 
Im in need help with creating a system where it will let me 
Add/drop players off a web page..basically of a roster with salary cap
control
And I want to do trades as well
This is for a fantasy football page.
 
And I need to have username and passwords so my owners can login and
there is no cheating..
 
http://www.ultimatefootballleague.com/index4.shtml
 
This is my site.
 
Please email me directly if you are interested in helping.
 
Thanks
Karl james 
 
 




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




[PHP] Re: Compatiblity: Zend-1.20 + PHP4.2.1

2002-05-14 Thread David Jackson

J --
Thanks your reply, I 'm a little confused as to the relationship between 
PHP and Zend?
I thought all request were processed by Zend? Or is Zend Optimizer 
something different from
Zend that built as part of PHP4.2.x? Who would a duplicate the error 
below on my Linux box.

Thanks for your time.
David 


J Smith wrote:

The change to register_globals doesn't affect the Zend Optimizer or any 
other extension afaik. That's a non-issue.

What is of issue are changes to the Zend Engine itself, which underlies PHP. 
Changes have been made to ZE that affect binary compatibility, so ZO 1.20 
doesn't work with PHP 4.2.1.

Here's the error message you'll likely receive if you try:

Zend Optimizer requires Zend Engine API version 20010710.
The Zend Engine API version 20020429 which is installed, is newer.

J


David J Jackson wrote:

  

Is my hosting company trying to pull the wool over my eyes?
There response to upgrading to 4.2.1, was that it isn't
compatible with Zind optomizer 1.20?

The only *issue* I seen with 4.2.x is of course register_globals!
(which of course be changed in php.ini)
I don't  have a problem with them holding off, but I do have a
problem with them trying to blow smoke up my ***.

Thanks,
David



  






Re: [PHP] Newbie challenge to brainiacs

2002-05-14 Thread David Jackson

Jay Blanchard wrote:
 
The burning issue that begs to be answered is, why reinvent the wheel?
There is a least a dozen blogs on freshmeat for PHP along... 
Unless your doing it just for kicks, which is OK.

David


 [snip]
   I want to try to find the hour that has the most hits
   The day of the week that has the most hits
   and the max and ave  no of hits of these.
 
 I haven't given it a whole lot of thought but I'd be tempted to dump the
 whole thing into an appropriately structured sql database and then use
 SELECT's to extract the information you want.  It'll likely end up
 faster and less processor intensive than doing it in php by itself I
 suspect.
 [/snip]
 
 +1
 
 Not only that, but then you will have the ability to create queries for
 other important factors in the logs without having to recode, or create
 code.
 
 Jay

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




Re: [PHP] Remote Hosting: Trouble shooting

2002-05-11 Thread David Jackson

Jason --
In actual fact the hosting company in question is used by a friend of 
mine, but not my me :)
And I agree he needs to draw a line in the sand, I mean the guy uses 
them for 2 sites and
his ISP?! It's time to say fix it by Monday at 08:00 or I'm canceling my 
accounts, but that's
just me and you.

My hosting company CQHost, is gettiing ready to put up 4.2.0  but as you 
suggested they
sticking with 1.3.x  for now, what's kind of nice is they message saying 
 Hey, there's been
some changes to 4.2.0, check you scripts.

Thanks for you reply,
David

If it has been going on for a month now then either the hosting company is 
completely incompetent or you haven't been pushing for a resolution as 
vigorously as you should have. If the former then witholding payment of your 
hosting fees might 'help' them :)

Did you know before you signed up that they were using cutting technology  -- 
Apache 2.0.X and PHP 4.2.X -- which apparently don't play well together (yet).

Your best bet is to stick to the tried and tested Apache 1.3.X series, maybe 
you can persuade them to downgrade?

  

Ja


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




[PHP] Re: help!!!

2002-05-05 Thread David Jackson

Jane --
Check http://www.freshmeat.net.
Keep in mind there's good and their simple.
Try searching on project, store, scheduler
also take a look at http://www.phprojetk.com ( or is it org).

HTH,
David

J. H. wrote:
 
 Can anyone here help me write a simple auto shop
 scheduling program? Would really appreciate it if you
 would help me out.
 
 Jane H.
 
 __
 Do You Yahoo!?
 Yahoo! Health - your guide to health and wellness
 http://health.yahoo.com

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




[PHP] Re: Apache-2.0.35 + 4.2.0RC4: not seeing index.php

2002-05-04 Thread David Jackson

Vins --
Thanks very much for your reply, I think your really close to the
answer.
Remember were talking about an ISP/hosting company (I actualy don't work
for them) using virtual hosting. Wouldn't a DirectiveIndex in the
VitualHost /VituralHost section of the httpd.conf override the
system directive? 
 
 I'm guessing that you've set the default directory index in the conf file
 for apache2 as follows.
 Directory Index   index.html index.php
 ???
Yes, my default index is setup on my local box this why.
I don't have any problems with it seeing index.php as the default index
page,
but I not running virtual host. 

What are you thoughts on the security question raised reblow?

 
  Also I beleive there maybe some secruity issues with their PHP
  configure, phpinfo() returns the following
  for Configure Command (NO --enable-track-vars or
  --enable-force-cgi-redirect):
 
  './configure' '--with-mysql' '--with-apxs2=/usr/local/apache2/bin/apxs'
 '--prefix=/usr/local/php4'
 
 
  Thanks in advance,
 
  David Jackson


Thanks again for you time and knowledge.
David Jackson

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




[PHP] Is this valid: IF:.. ELSE: ENDIF:

2002-05-04 Thread David Jackson

Greeting ---
I was handed a broken form that contain:

IF (cond):

.

ELSEIF:

..
ENDIF:


My Questions are:
1. Is this type of IF: code block valid in PHP4.x.x?
2. Shouldn't  it be --

IF (cond):
ELSE:

or maybe

IF (cond):
ELSEIF (cond):
ELSE:

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




Re: [PHP] Is this valid: IF:.. ELSE: ENDIF:

2002-05-04 Thread David Jackson

Miguel --
Thanks for you reply, the if (ops) else is the only one
could find listed in the docs. and you right that's the
why normal people do it, but this devoloper used to be a COBAL
programer which explain it.

Thanks again,
David


 On Sat, 4 May 2002, David Jackson wrote:
 Greeting ---
 I was handed a broken form that contain:
 
 IF (cond):
 
 .
 
 ELSEIF:
 
 ..
 ENDIF:
 
 
 My Questions are:
 1. Is this type of IF: code block valid in PHP4.x.x?
 
 I think it is, but I've never heard of anyone using it. One teensy
 thing;  the endif should be followed by a semicolon rather than a
 colon, as it  terminates the compound statement.
 
 Of course, most normal people use:
 
  if (cond) {}
  elseif (cond) {}
 
 and 'endif' is then moot as the scope of the branch is terminated by
 the  last closing brace.
 
 miguel


-- 



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




Re: [PHP] Message isn't received in form mailer

2002-05-04 Thread David Jackson

Jason --
This ain't pretty (and probly not even correct) but it works:

David 

-- Mail Call PHP 

html
headtitlehello mail/title/head
body

pre
?php
$From = $_POST['from'];
$Two = $_POST['two'];
$Subject = $_POST['sub_ject'];
$Comments = $_POST['comments'];
echo b$From/b;print \n;
echo $Two;print \n;
echo $Subject;print\n;
echo $Comments;print \n;
?
?php mail($Two,$Subject,$Comments) ?
/pre
/body
/html

-
Jason Wong wrote:
 
 On Sunday 05 May 2002 00:39, Rodrigo wrote:
  Hi guys, I'm trying to send the contents of a form thru the php script
  under this message, but I'm not receiving the message itself, I just
  receive the message in blank. Just with the subject and the from.
  Does anybody know what the problem is?
  Thanks for the help, Rodrigo
 
  ?php
   $Destino =  mailto:[EMAIL PROTECTED] [EMAIL PROTECTED];
   $Remetente = $name $email;
   $Assunto = Form Domain.com;
   $Mensagem = $coments;
   mail($Destino,$Assunto,$Mensagem,From:$Remetente\n);
   header(Location:http://www.domain.com/success.htm;);
  ?
 
 Presumably you've echo($Mensagem) and it does contain something?
 
 --
 Jason Wong - Gremlins Associates - www.gremlins.com.hk
 Open Source Software Systems Integrators
 * Web Design  Hosting * Internet  Intranet Applications Development *
 
 /*
 timesharing, n:
 An access method whereby one computer abuses many people.
 */

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




[PHP] Re: » PHP Installation Problems «

2002-05-04 Thread David Jackson

Vins --

Let me  see if  I can return the favor.
Here's what the seem to work for me with PHP4.2.0:
  form.php 

// Depending on wheather your using  POST or GET
$var_name1 = $_POST['form_var_name']'
// or
$var_name2= $_GET['form_var_name']'
echo $var_name1;
echo $var_name2;

Also I believe you used to have to ./configure --enable-track-vars? This 
maybe depreciated now ?
See variable sections of manaul for sorid details.


David Jackson
[EMAIL PROTECTED]






Vins wrote:

I have installed php4 with apache 1.3.24.
Downgraded apache again.
LOL

When I wan't to submit a form from say  form.php to from2.php
with the following fields   :   input field name=stuff
input stuff contains  Hello World

when i submit form.php
form2.php displays nothing.

I've set form2.php to echo $stuff;

My php4 installation doesn't seem to be sending my variables.
but the funny thing is that phpmyadmin works 100% fine.

what could be the problem ?


  




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




[PHP] Is --enable-track-vars still needed?

2002-05-04 Thread David Jackson

Is I still recommended that config be run with the --enable-track-vars flag?
Or has this been deprieciated? Recently? Does the chagnes to global vars 
come in to play here?


TIA,
David Jackson


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




[PHP] Apache-2.0.35 + 4.2.0RC4: not seeing index.php

2002-05-03 Thread David Jackson

I'm trying to trouble shoot a problem with a site hosted on a local ISP.
They're running Slackware-8.0,apache-2.0.35 and PHP4.2.0RC4 and virtual
hosting?

The problem is the site not seeing index.php as default directory index?
The SA assured me
that both the DirectoryIndex and AddType are setup up correct?

My question is what do they need todo to correct this, and how can I
recreate this error?
I'm running  Slackware-8.0, Apache-2.0.35 and PHP4.2.0?

Also I beleive there maybe some secruity issues with their PHP
configure, phpinfo() returns the following
for Configure Command (NO --enable-track-vars or
--enable-force-cgi-redirect):

'./configure' '--with-mysql' '--with-apxs2=/usr/local/apache2/bin/apxs'
   '--prefix=/usr/local/php4'


Thanks in advance,

David Jackson

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




[PHP] undefined symbol: uncompress

2002-01-27 Thread David Jackson

I've seen similar question in the archive, but here it goes?
Setup: Slackware-8.0, Apache-1.3.23, mysql-3.23.47-pc-linux-gnu-i686
Config options:
Apache: ./configure --prefix=/usr/local/www --with-modules=most
compiles and run fine.

MySQl from binaires run fine into /usr/local/mysql (set ld.so.conf to
correct value).

PHP-4.1.1: ./configure --with-apxs=/usr/local/www/bin/apxs
--with-mysql=/usr/local/mysql
cp php-ini-recommanded /usr/local/lib/php.ini
Added AddType statement to httpd.conf


Results in following error when I try to start Apache:

Syntax error on line 236 of /usr/local/www/conf/httpd.conf:
Cannot load /usr/local/www/libexec/libphp4.so into server:
/usr/local/www/libexec/libphp4.so: undefined symbol: uncompress

Line 236 of http.conf:
LoadModule php4_modulelibexec/libphp4.so


Thanks for you help.
David Jackson

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




Re: [PHP] undefined symbol: uncompress

2002-01-27 Thread David Jackson

Mike --
Thanks for you reply, I made the changes an am stilling getting the same
error?
On the other hand if I compile PHP with out specifing mysql home. I
don't get the error.

David Jackson

Miles Thompson wrote:
 
 Add the path to libphp4.so to the file /etc/ld.conf.so
 and run ldconfig
 
 or
 
 copy libphp4.so to the libexec directory found beneath the main apach directory.
 It's most likely in the libs directory of your php source directory.
 
 The second way is probably the best.
 
 HTH - Miles Thompson
 
 On Sunday 27 January 2002 03:11 pm, David Jackson wrote:
  I've seen similar question in the archive, but here it goes?
  Setup: Slackware-8.0, Apache-1.3.23, mysql-3.23.47-pc-linux-gnu-i686
  Config options:
  Apache: ./configure --prefix=/usr/local/www --with-modules=most
  compiles and run fine.
 
  MySQl from binaires run fine into /usr/local/mysql (set ld.so.conf to
  correct value).
 
  PHP-4.1.1: ./configure --with-apxs=/usr/local/www/bin/apxs
  --with-mysql=/usr/local/mysql
  cp php-ini-recommanded /usr/local/lib/php.ini
  Added AddType statement to httpd.conf
 
 
  Results in following error when I try to start Apache:
 
  Syntax error on line 236 of /usr/local/www/conf/httpd.conf:
  Cannot load /usr/local/www/libexec/libphp4.so into server:
  /usr/local/www/libexec/libphp4.so: undefined symbol: uncompress
 
  Line 236 of http.conf:
  LoadModule php4_modulelibexec/libphp4.so
 
 
  Thanks for you help.
  David Jackson

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




Re: [PHP] undefined symbol: uncompress

2002-01-27 Thread David Jackson

Micheal --
Thanks for your replys.
What I see in /usr/local/mysql/lib is:

libmysqlclient.a 

I'm wondering if the MySQL binaaries use static libs?



Thanks, 
David


Michael Sims wrote:
 
 At 12:50 PM 1/27/2002 -0700, David Jackson wrote:
 Mike --
 Thanks for you reply, I made the changes an am stilling getting the same
 error?
 On the other hand if I compile PHP with out specifing mysql home. I
 don't get the error.
 
 Check and see which directory libmysqlclient.so is in, and make sure that
 directory is listed in /etc/ld.so.conf and rerun ldconfig.  Then try to
 start the server.

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




[PHP] test

2002-01-02 Thread David Jackson

Let see does my PERSONEL unsubscribe information appear at the bottom
of this email?

For the second time in 48hrs. someone submitted an unsubscribe request
using for me?

Yet I still get the list postings? 

How strange.
-- 



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




Re: [PHP] Connect to IBM DB2

2002-01-02 Thread David Jackson

Jerry --
I didn't see any functions listed in:
http://www.php.net/manual/en/

for DB2 the ODBC maybe you only answers, heres the link:
http://www.php.net/manual/en/ref.odbc.php

David



 To connect to Microsoft SQL 7 I'm using the following script which
 works fine:
 
 ?php
 $query=SELECT * FROM DB1;
 $queryupd=UPDATE DB1 SET dateval='20010101' where dateval='2101';
 $hostname = dbserver;
 $username = username;
 $password = pwd;
 $dbName = DB;
 mssql_connect($hostname,$username,$password) or die(DATABASE FAILED TO
 RESPOND.);
 mssql_select_db($dbName) or DIE(Table unavailable);
 $result2 = MSSQL_QUERY($queryupd); // Execute Update Statment
 $result = MSSQL_QUERY($query);  // Execute Select Statment
 $number = MSSQL_NUM_ROWS($result);
 $i=0;
 if($number == 0) print No data?;
 elseif($number  0){
 print Number of rows: $numberBR;
 while($i  $number){
 $dateval = mssql_result($result,$i,dateval);
 echo TRTDFONT color=#112266$dateval/FONT/TD;
 $i++;}
 }
 ?
 
 Now, how to connect to a DB2 database server without ODBC ?
 
 My config is:
 Web Server: IIS on windows 2000 Server
 Database Server: IBM DB2 V7.1 on windows 2000 Server
 PHP4 for windows
 
 Thanks.
 
 Jerry
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail:
 [EMAIL PROTECTED]


-- 



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




Re: [PHP] Re: Need some Linux/Apache help

2002-01-01 Thread David Jackson

Todd --

Send email to [EMAIL PROTECTED]

In body of email: subscribe linux-admin

You might also check for distrbution specific forum/list
Slackware has one, I'm sure Redhat has some.

By the why, were you compile Apache/Mysql and PHP from *tgz sources ? 


 David -
 
 
 Try Cross posting to: linux-admin list

 
 How do I join the list?
 
 Todd
 
 --
 Todd Cary
 Ariste Software
 [EMAIL PROTECTED]
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail:
 [EMAIL PROTECTED]


-- 



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




Re: [PHP] cron test

2002-01-01 Thread David Jackson

How about posting to the OS specific related forum?
For Linux try subscribing to linux-admin at [EMAIL PROTECTED]

for Solaris, HP-UX and other check news group list

DJJ


 
 
 -Original Message-
 
 
 
 Sorry this is offtopic
 
 I have set up a cron job and this is the message I havereceived
 
 Your terminal lacks the ability to clear the screen or position the
 cursor.
 
 any ideas?
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail:
 [EMAIL PROTECTED]


-- 



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




[PHP] Generating Static Pages

2002-01-01 Thread David Jackson

This may seem a little odd?
But what I want to do is use PHP/MySQL to generate static pages.
The applet I tinkering with is a sales worksheet and to start with will
consist of catalog/product maintience page, and a worksheet allow sales reps 
work up pricing for customers. Eventfully this would tie into an
contact manager. The code to generate the catalog is below:
I'm sure it's a fopen(), passthru operation, I 'm just not sure what's
the most effective why to write the HTML out to file?

-- Thanks for your time -- David

- Make Catalog PHP -







mkcatalog.php
Description: application/unknown-content-type-php_auto_file

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


Re: [PHP] Generating Static Pages

2002-01-01 Thread David Jackson

Sorry here's the code unattached:

?php
include(/home/sites/www.pickledbeans.com/web/html_header.php);
// include(/home/sites/www.pickledbeans.com/web/connect.php);
include(/connect.php);
echo body \n;
echo form method = \post\ action =\invoice.php\\n;
echo pSales Date:/p\n;
echo pinput type=\Text\ name=\frm_date\ size=\15\/p\n;
echo pSales Rep:/p\n;
echo pinput type=\text\ name=\frm_sid\ size=\4\/p;
// Define table
echo brtable bgcolor=\gray\ border=\1\ ;
// Generate book listing
$result = mysql_query(SELECT pid,date,title,subtitle,author,amount FROM 
catalog ) or die(Dis ain't right !!); 
while ( 
list($pid,$date,$title,$subtitle,$author,$amount)=mysql_fetch_row($result)){
echo tr\n;
echo tdinput type=\checkbox\ name=\frm_pid[]\ value = \$pid\ 
/td;
echo td$title/td;
echo tdPrice: $amount/td;
echo /tr\n;
}
echo /table;
echo pinput type=\Submit\ name=\submit\ value=\Submit\;
echo input type=\Reset\ name=\reset\ value=\Reset\/p;
echo /form;
echo /body;
echo /html;
mysql_free_result ($result);
mysql_close($link);
exit;
?


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




Re: [PHP] Re: What the hell?!?!

2002-01-01 Thread David Jackson

copy php.log php.txt, now you have a static log to look at.
then do more php.txt this will display a screen at a time,hitting space
goes to the next screen.

To do more advanced work with text files goto:
http://simtel.net gnuish directory and download gawk and grep, mainly
grep, NOTE: using grep is O.T. for this forum, but you in a nutshell,
the command string would look this: grep -i seach_string filename |more
or grep -i fatal* filename |more, you get the idea.


 I need a program which will let me open it!
 Using notepat just runs wordpad which wont let me scroll down to see
 what it says because it's still processing the file.
 Internet explorer didnt work and MS-DOS editor just said Out of
 memory and closed on me
 Never mind!
 
 
 
 Laserjetter [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I've just been preparing a site for upload from my local test server
 to
 the
 net and have come accross a php.error.log file which was 13.4Mb! I'm
 using PHP 4.1.0 and Apache 1.3.19 on Win98se and ever since upgrading
 to
 4.1 PHP
 has been creating these error log files all over the place. Does
 anyone
 know
 what to change in php.ini to stop it doing this?
 Also, apart from my coding being rubbish and causing lots of errors,
 does anyone know of any reason why an error log file would grow to
 such a huge size? The page has onle been accessed a few times and I
 can't think of any way a single page could create 1Mb of error text on
 each hit.

 LJ




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


-- 



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




Re: [PHP] web mail clients?

2001-12-31 Thread David Jackson

Philip --
If you just want to install one:
http://freshmeat.net Browse down to PHP project, there 4-6 are ready out
there.

If you want to roll your own check out the tutorials at:
http://www.melonfire.com/community/columns/trog/

Note: The mail client I send this mail from appears to be a 
PHP front to mailx, the saved mail is store in Unix type mail
folders in my home directory. i.e. it appends messages to the
end of a text file. 

Hope this helps.
David


 Hi,
 
 I'm looking into setting up a web based mail client for personal use.
 
 I've got most of it figured out (sending, recieving, forwarding etc..).
 
 
 I need to be able to use folders in the mail client to organise the
 messages. Whats the best way of moving messages around?
 
 Do i need to store them as files / in a database or is there an easier
 way to do it?
 
 Thanks.
 
 -
 Philip Jeffs
 
 The Tickle Group
 The Gate House
 Summerseat
 Bury
 Lancashire
 BL9 5PE
 United Kingdom
 W: http://www.tickle.co.uk
 T: 01706 823456
 F: 01706 829500
 E: [EMAIL PROTECTED] (daytime)
[EMAIL PROTECTED] (evening)
 -


-- 



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




Re: [PHP] how to read posted data?

2001-12-31 Thread David Jackson

Also check out tutorials at:
http://www.melonfire.com/community/columns/trog/

-- david


 USE
 $HTTP_RAW_POST_DATA
 or something like that
 
 i'll look it up for you
 Zhiqiang He [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]...
 i have resolved this problem, use $HTTP_RAW_POST_DATA.

 On Thu, 11 Oct 2001 13:12:54 GMT, [EMAIL PROTECTED] (Zhiqiang He) wrote:

 problem like this:
 
 The data in HTML form POSTs is packaged into name value pairs. But
 when IE 5 exports its favorites file to a server (an HTML file), it
 sends a raw HTTP POST of the data (there are no names and values,
 just a raw text stream.
 
 On Thu, 11 Oct 2001 12:58:09 +0300, [EMAIL PROTECTED]
 (=?Iso-8859-1?Q?Niklas_lamp=E9n?=) wrote:
 
 Use $FieldName or $HTTP_POST_VARS.
 
 
 Niklas
 
 -Original Message-
 From: ZhiQiang He [mailto:[EMAIL PROTECTED]]
 Sent: 11. lokakuuta 2001 12:54
 To: [EMAIL PROTECTED]
 Subject: [PHP] how to read posted data?
 
 
 we want to use post data in php, how can we read it?
 note, this post data is not sent by form.
 thanks in advance, ^_^
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED] To
 contact the list administrators, e-mail:
 [EMAIL PROTECTED]
 
 

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


-- 



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




Re: [PHP] MySQL problem

2001-12-30 Thread David Jackson

Here's the example from the PHP manual:
The tutorial here are very helpfull: 
http://www.melonfire.com/community/columns/trog/

-- David

?php
// Connecting, selecting database
$link = mysql_connect(mysql_host, mysql_login, mysql_password)
or die(Could not connect);
print Connected successfully;
mysql_select_db(my_database)
or die(Could not select database);

// Performing SQL query
$query = SELECT * FROM my_table;
$result = mysql_query($query)
or die(Query failed);

// Printing results in HTML
print table\n;
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
print \ttr\n;
foreach ($line as $col_value) {
print \t\ttd$col_value/td\n;
}
print \t/tr\n;
}
print /table\n;

// Closing connection
mysql_close($link);
?




 Hello,
 
 I am extremely new to MySQL and have never managed to get working
 smoothly with PHP before. I am trying really hard to understand
 how to work it, and am almost there.
 
 I have a problem which I do not know how to resolve and was
 wondering if anybody could help me. I have no idea what is wrong
 with the code and why I am getting the error message;
 
 Warning: Supplied argument is not a valid MySQL result resource in 
 C:\apache\htdocs\sams\chapter10\results.php on line 47
 
 I am currently using a book to aid me with MySQL, and this is an
 example from the book. It does not seem to work and I have no idea what
 I may have done wrong to obtain this warning.
 
 I have changed my login and password to question marks.
 
 ?
 
  if (!$searchtype || !$searchterm)
 
  {
 echo You have not entered search details.  Please go back and try 
 again.;
 
 exit;
 
  }
 
 
  $searchtype = addslashes($searchtype);
 
  $searchterm = addslashes($searchterm);
 
  @ $db = mysql_pconnect(mesh, bookorama, bookorama123);
 
  if (!$db)
 
  {
 echo Error: Could not connect to database.  Please try again
 later.;
 
 exit;
 
  }
 
  mysql_select_db(booktest);
 
  $query = select * from booktest where .$searchtype. like 
 '%.$searchterm.%';
 
  $result = mysql_query($query);
 
  $num_results = mysql_num_rows($result);
 
  echo pNumber of books found: .$num_results./p;
 
  for ($i=0; $i $num_results; $i++)
 
  {
 
 $row = mysql_fetch_array($result);
 
 echo pstrong.($i+1).. Title: ;
 
 echo stripslashes($row[title]);
 
 echo /strongbrAuthor: ;
 
 echo stripslashes($row[author]);
 
 echo brISBN: ;
 
 echo stripslashes($row[isbn]);
 
 echo brPrice: ;
 
 echo stripslashes($row[price]);
 
 echo /p;
 
  }
 
 ?
 
 The problem seems to be around the lines of code;
 
 $result = mysql_query($query);
 
 $num_results = mysql_num_rows($result);
 
 Any assistance is appreciated.
 
 Yours,
 
 GF.
 
 _
 Chat with friends online, try MSN Messenger: http://messenger.msn.com
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail:
 [EMAIL PROTECTED]


-- 



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




Re: [PHP] MySQL problem

2001-12-30 Thread David Jackson

I almost forgot add a or mysql_error() for each line like this:
?php
// database connect script
$dbhostname = localhost;
$dbuser = db_user_name; 
$dbpasswd = db_password;
$dbname= db_name;
$link = mysql_connect($dbhostname, $dbuser, $dbpasswd) 
echo mysql_error();
mysql_select_db($dbname)
echo mysql_error();
?

This will return human readable error messges
Can you onto mysql database from command.
mysql -u root -p mysql
or mysql -u root mysql # A root password isn't usally get during install.

if so:
select user,host,password from user;

then:
select user,host,db from db;

My quesss you don't have any permission for the databases or to connect
to local host. If this is correct do:

GRANT ALL on db_name.* TO you@local host idendified by 'your_password';


 Hiya,
 
 Thanks for the quick reply. I used the PHP manual example and it
 connects to the database successfully but cannot select the database.
 
 I'm not sure why this is? I've looked hard at it and I cannot see where
 I have gone wrong.
 
 Thanks.
 
 GF.
  - Original Message - 
  From: David Jackson 
  To: [EMAIL PROTECTED] 
  Cc: [EMAIL PROTECTED] 
  Sent: Monday, December 31, 2001 1:48 AM
  Subject: Re: [PHP] MySQL problem
 
 
  Here's the example from the PHP manual:
  The tutorial here are very helpfull:
  http://www.melonfire.com/community/columns/trog/
 
  -- David
 
  ?php
  // Connecting, selecting database
  $link = mysql_connect(mysql_host, mysql_login, mysql_password)
  or die(Could not connect);
  print Connected successfully;
  mysql_select_db(my_database)
  or die(Could not select database);
 
  // Performing SQL query
  $query = SELECT * FROM my_table;
  $result = mysql_query($query)
  or die(Query failed);
 
  // Printing results in HTML
  print table\n;
  while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
  print \ttr\n;
  foreach ($line as $col_value) {
  print \t\ttd$col_value/td\n;
  }
  print \t/tr\n;
  }
  print /table\n;
 
  // Closing connection
  mysql_close($link);
  ?
 
 
 
 
   Hello,
  
   I am extremely new to MySQL and have never managed to get working
   smoothly with PHP before. I am trying really hard to understand how
   to work it, and am almost there.
  
   I have a problem which I do not know how to resolve and was
   wondering if anybody could help me. I have no idea what is wrong
   with the code and why I am getting the error message;
  
   Warning: Supplied argument is not a valid MySQL result resource in
   C:\apache\htdocs\sams\chapter10\results.php on line 47
  
   I am currently using a book to aid me with MySQL, and this is an
   example from the book. It does not seem to work and I have no idea
   what I may have done wrong to obtain this warning.
  
   I have changed my login and password to question marks.
  
   ?
  
if (!$searchtype || !$searchterm)
  
{
   echo You have not entered search details.  Please go back and
   try
   again.;
  
   exit;
  
}
  
  
$searchtype = addslashes($searchtype);
  
$searchterm = addslashes($searchterm);
  
@ $db = mysql_pconnect(mesh, bookorama, bookorama123);
  
if (!$db)
  
{
   echo Error: Could not connect to database.  Please try again
   later.;
  
   exit;
  
}
  
mysql_select_db(booktest);
  
$query = select * from booktest where .$searchtype. like
   '%.$searchterm.%';
  
$result = mysql_query($query);
  
$num_results = mysql_num_rows($result);
  
echo pNumber of books found: .$num_results./p;
  
for ($i=0; $i $num_results; $i++)
  
{
  
   $row = mysql_fetch_array($result);
  
   echo pstrong.($i+1).. Title: ;
  
   echo stripslashes($row[title]);
  
   echo /strongbrAuthor: ;
  
   echo stripslashes($row[author]);
  
   echo brISBN: ;
  
   echo stripslashes($row[isbn]);
  
   echo brPrice: ;
  
   echo stripslashes($row[price]);
  
   echo /p;
  
}
  
   ?
  
   The problem seems to be around the lines of code;
  
   $result = mysql_query($query);
  
   $num_results = mysql_num_rows($result);
  
   Any assistance is appreciated.
  
   Yours,
  
   GF.
  
   _
   Chat with friends online, try MSN Messenger:
   http://messenger.msn.com
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED] To
   contact the list administrators, e-mail:
   [EMAIL PROTECTED]
 
 
  --


-- 



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




Re: [PHP] Session troubles

2001-12-29 Thread David Jackson

Sean --
Don't know if this help but here's what I just worked for me.
What ver. of PHP are you using? It seem to me that 3.x.x needs 
PHPLIB: http://sourceforge.net/projects/phplib
to handle sessions?  -- David Jackson

--- sean.php ---
?php include(seaninc.php); ?

--- seaninc.php --
?php
session_start();
session_register(i);
$i++;
echo $i;
?




 On 12-29 09:59, Miles Thompson wrote:
 Sean,
 
 What's going on in incl.php. Are you issuing a session_start()?
 
 No, I was not.
 
 What if it's rearranged like so, as I understand you have to register
 the session variable  before using it.
 
 include(incl.php);
 session_start();
 session_register(mine);
 $mine++;
 echo $mine;
 
 No dice, either. Actually, I had tried several permutations of the
 order  before posting. :)
 
 
 There's the divide and conquer approach too.  What do you see if you
 comment out the include, then issue a phpinfo() and a die()?
 
 Okay, I tried commenting out include, resulting in this code:
 
 session_start();
 session_register(i);
 $i++;
 echo $i;
 
 When I run the above, I get this:
 Fatal error: Failed to initialize session module in
 /usr/local/apache/htdocs/sesstest.php on line 6
 
 Which is getting somewhere, in a way. Line 6 is session_start(); 
 
 What part from phpinfo() output were you interested in? Or did you want
 to see all of it?
 
 Thanks for the help. 
 
 
 HTH and Merry Christmas / Happy New Year - Miles Thompson
 
 On Friday 28 December 2001 11:26 pm, Sean LeBlanc wrote:
  I asked this on php-install list, but got no response so here
  goes...
 
  I simply cannot get session to work correctly. Here's the test
  script:
 
  include(incl.php);
  session_start();
  $mine++;
  session_register(mine);
  echo $mine;
 
  incl.php includes code to save/retrieve session information to/from
  DB.  It calles session_set_save_handler at the end.
 
  What happens is I get an error because it is trying to read the
  variable out and I get a DB error, but my session writing routine is
  never called...I know, because I have a print in there. And of
  course, the var doesn't increment upon refreshes - it remains 1.
 
  I've seen this before, and it was fixed, but I forget how it was
  done, as I didn't actually implement the solution (I hear and I
  forget, I do and I remember, I guess). About my system:
 
  FreeBSD 4.4
  Apache 1.3.20
  PHP 4.0.6
 
  Any and all help appreciated.
 
 -- 
 Sean LeBlanc:[EMAIL PROTECTED] Yahoo:seanleblancathome 
 ICQ:138565743 MSN:seanleblancathome AIM:sleblancathome 
 One learns to itch where one can scratch. 
 -Ernest Bramah 
 Management QOTD:Get hopping on the domain expertise!!
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail:
 [EMAIL PROTECTED]


-- 



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




Re: [PHP] Session troubles

2001-12-29 Thread David Jackson

Sean --
Do you get the same errors, with Netscape 4.x?


 On 12-29 12:56, David Jackson wrote:
 Sean --
 Don't know if this help but here's what I just worked for me.
 What ver. of PHP are you using? It seem to me that 3.x.x needs 
 PHPLIB: http://sourceforge.net/projects/phplib
 to handle sessions?  -- David Jackson
 
 --- sean.php ---
 ?php include(seaninc.php); ?
 
 --- seaninc.php --
 ?php
 session_start();
 session_register(i);
 $i++;
 echo $i;
 ?
 
 I'm using 4.0.6. I believe session handling was added as part of
 standard 4.x, right (if configured to compile it)? 
 
 Some more info: I tried with Konqueror, as I know a cookie needs to be
 sent during the session_start() phase - I did get a dialog pop-up
 asking if I wanted to accept the cookie, but I still got the error:
 
 Fatal error: Failed to initialize session module in
 /usr/local/apache/htdocs/sesstest.php on line 2
 
 It says line 2 because I deleted some white space and commented out
 code thas was before session_start().
 
 I set logging errors on, and sent it to syslog. Here's what it says:
 Dec 29 12:12:57 free httpd: PHP Fatal error:  Failed to initialize
 session module in /usr/local/apache/htdocs/sesstest.php on line 2
 Dec 29 12:12:57 free httpd: PHP Warning:  Failed to write session data
 (user). Please verify that the current setting of session.save_path is
 correct (/tmp) in Unknown on line 0
 
 But /tmp exists, and is world writeable:
 
 free# ls -ld /tmp
 drwxrwxrwt  16 root  wheel  1024 Dec 29 12:14 /tmp
 
  On 12-29 09:59, Miles Thompson wrote:
  Sean,
  
  What's going on in incl.php. Are you issuing a session_start()?
  
  No, I was not.
  
  What if it's rearranged like so, as I understand you have to
  register the session variable  before using it.
  
  include(incl.php);
  session_start();
  session_register(mine);
  $mine++;
  echo $mine;
  
  No dice, either. Actually, I had tried several permutations of the
  order  before posting. :)
  
  
  There's the divide and conquer approach too.  What do you see if
  you comment out the include, then issue a phpinfo() and a die()?
  
  Okay, I tried commenting out include, resulting in this code:
  
  session_start();
  session_register(i);
  $i++;
  echo $i;
  
  When I run the above, I get this:
  Fatal error: Failed to initialize session module in
  /usr/local/apache/htdocs/sesstest.php on line 6
  
  Which is getting somewhere, in a way. Line 6 is session_start(); 
  
  What part from phpinfo() output were you interested in? Or did you
  want to see all of it?
  
  Thanks for the help. 
  
  
  HTH and Merry Christmas / Happy New Year - Miles Thompson
  
  On Friday 28 December 2001 11:26 pm, Sean LeBlanc wrote:
   I asked this on php-install list, but got no response so here
   goes...
  
   I simply cannot get session to work correctly. Here's the test
   script:
  
   include(incl.php);
   session_start();
   $mine++;
   session_register(mine);
   echo $mine;
  
   incl.php includes code to save/retrieve session information
   to/from DB.  It calles session_set_save_handler at the end.
  
   What happens is I get an error because it is trying to read the
   variable out and I get a DB error, but my session writing routine
   is never called...I know, because I have a print in there. And of
   course, the var doesn't increment upon refreshes - it remains 1.
  
   I've seen this before, and it was fixed, but I forget how it was
   done, as I didn't actually implement the solution (I hear and I
   forget, I do and I remember, I guess). About my system:
  
   FreeBSD 4.4
   Apache 1.3.20
   PHP 4.0.6
  
   Any and all help appreciated.
  
  -- 
  Sean LeBlanc:[EMAIL PROTECTED] Yahoo:seanleblancathome 
  ICQ:138565743 MSN:seanleblancathome AIM:sleblancathome 
  One learns to itch where one can scratch. 
  -Ernest Bramah 
  Management QOTD:Get hopping on the domain expertise!!
  
  
  -- 
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED] To
  contact the list administrators, e-mail:
  [EMAIL PROTECTED]
 
 
 -- 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail:
 [EMAIL PROTECTED]
 
 -- 
 Sean LeBlanc:[EMAIL PROTECTED] Yahoo:seanleblancathome 
 ICQ:138565743 MSN:seanleblancathome AIM:sleblancathome 
 In most countries selling harmful things like drugs is punishable. Then
  howcome people can sell Microsoft software and go unpunished? 
 -Hasse Skrifvars 
 Management QOTD:Work out a solution that fits with problem management!!
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail:
 [EMAIL PROTECTED]


-- 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL

Re: [PHP] Session troubles

2001-12-29 Thread David Jackson

Sean --

Give the attached scripts a shot, a post the results.

Note: Xitami(server+WinMe) + IE5.5 or Mozilla 9.7 works 
fine but with Netscape-4.9 it returns var names? But
when served from Unix/Linux and Apache all 3 work as expected !!

Anywhy give them shot. -- David

--- form.html ---
?xml version=1.0 encoding=iso-8859-1?
!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 /
  titleNo title/title
  meta name=GENERATOR content=amaya 5.2 /
/head
body

form method=post action=form.php
  pinput type=text size=20 name=stuff //p
  pinput type=text size=20 name=more_stuff //p
  pinput type=text size=20 name=still_more_stuff //p

pinput type=submit value=Submit //p
pinput type=reset value=Reset //p
/form
/body
/html

--- form.php 

?php 
// sessions  on 48 N. Random Rd.
session_start();
session_register('Green');
session_register('Yellow');
session_register('Red');
$Green  =  $stuff;
$Yellow = $more_stuff;
$Red = $still_more_stuff;

// basic echo of var from form
echo We've just echoed var from form\n;
echo p$Green/p;
echo h2$Yellow/h2;
echo h3$Red/h3;
echo pa href=\form02.php\Verify that session_vars were 
passwd/a/p;
// Get out of here

?

--- form02.php -
?php 
session_start();
// sessions  on 48 N. Random Rd.
// basic echo of var from form
echo htmlheadtitle/title/head;
echo body;
echo h2session_registers:;
echo pGreen:$Green/p;
echo pYellow:$Yellow/p;
echo pRed:$Red/p;
echo /body/html;
?




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




Re: [PHP] Templating solutions?

2001-12-29 Thread David Jackson

Lauri --
You might want to take a look at: http://www.thewebmasters.net/php/
there's a tutorial located here: 
http://www.devshed.com/Server_Side/PHP/PHPFastTemplate/page1.html

-- David
 Hi there!
 
 During the last two weeks or so, I've been bugged by a question deep
 inside me. It's about various templating solutions used with dynamic
 web applications.
 
 Oftentimes simply embedding the code into the HTML template does the
 trick. Othertimes the
 codeinclude(header.inc);/codeand
 codeinclude(footer.inc);/code works its magic.
 
 There are, however, also moments when such approaches aren't enough and
 something else is required.
 
 What does one do when the templates of most pages within one site
 differ in look and feel? One possibility would be to specify a
 template, load it into a variable and replace certain marked spots (a
 la !--left_navbar--) with the dynamically created code/text using
 eregi_replace() or something similar.
 
 What are the templating solutions available? Pros and cons?
 
 How do you solve your templating?
 
 Yours,
 Lauri
 --
 Tharapita Creations
 [dynamic web applications]
 [EMAIL PROTECTED]
 Mobile: +372 53 410 610
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail:
 [EMAIL PROTECTED]


-- 



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




Re: [PHP] Templating solutions?

2001-12-29 Thread David Jackson

Woops -- first link is to the site for PHPFastTemplate.

 Lauri --
 You might want to take a look at: http://www.thewebmasters.net/php/
 there's a tutorial located here: 
 http://www.devshed.com/Server_Side/PHP/PHPFastTemplate/page1.html
 
 -- David
 Hi there!
 
 During the last two weeks or so, I've been bugged by a question deep
 inside me. It's about various templating solutions used with dynamic
 web applications.
 
 Oftentimes simply embedding the code into the HTML template does the
 trick. Othertimes the
 codeinclude(header.inc);/codeand
 codeinclude(footer.inc);/code works its magic.
 
 There are, however, also moments when such approaches aren't enough
 and something else is required.
 
 What does one do when the templates of most pages within one site
 differ in look and feel? One possibility would be to specify a
 template, load it into a variable and replace certain marked spots (a
 la !--left_navbar--) with the dynamically created code/text using
 eregi_replace() or something similar.
 
 What are the templating solutions available? Pros and cons?
 
 How do you solve your templating?
 
 Yours,
 Lauri
 --
 Tharapita Creations
 [dynamic web applications]
 [EMAIL PROTECTED]
 Mobile: +372 53 410 610
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail:
 [EMAIL PROTECTED]
 
 
 -- 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail:
 [EMAIL PROTECTED]


-- 



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




Re: [PHP] Session troubles

2001-12-29 Thread David Jackson

Sean --

Does you standard (non session) seem to work ok? Such as:
?php 
// basic echo of var from form
echo We've just echoed var from form\n;
echo p$stuff/p;
echo h2$more_stuff/h2;
echo h3$still_more_stuff/h3;
?

Did you compile Apache and PHP from source? If so
could you provide me with the ./configure --options you used?
This is sound like a config/compile problem to me. 

You might also want to cross-post to linux-admin mail list?

-- David



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




Re: [PHP] Handling checkboxs (MySQL+PHP)

2001-12-29 Thread David Jackson

Brian --
So I should change the line:
echo tdinput type=\checkbox\ name=\frm_pid\ value = \$pid\ 
/td;

To:
echo tdinput type=\checkbox\ name=\frm_pid[]\ value = \$pid\ 
/td;

Or do I change the value=

Thanks -- David

 * David Jackson ([EMAIL PROTECTED]) [Dec 29. 2001
 21:41]:
 
 [...]
 
 My question is how do I process checkbox when multi boxes have
 been check. I keep thinking a array is created by check boxes?
 
 Use string[] as the name(s) -- where string is the label for the
 array  you want.
 
 -- 
 Brian Clark | Avoiding the general public since 1805!
 Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
 Caution: Cape does not enable user to fly.
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail:
 [EMAIL PROTECTED]


-- 



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




Re: [PHP] Exec as user

2001-12-27 Thread David Jackson

Charles ---
As a general run on an Unix server httpd is run as user and group nobody.



 I have been looking through the docs and found no help on either
 finding which user the EXEC'ed commands run as, or how to specify which
 user they should run as.  I tried exec, system, and passthru running a
 batch file that would write %USERNAME% to a file.  And all three
 functions wrote nothing.  They would however write hello world.  Has
 anybody else run into this.  
 
 I tried exec(test.bat);
 test.bat:
 echo %USERNAME%  test.txt
 
 when run from a command line it resulting in Charles
 when run from a webpage it resulted in ECHO is on.
 if I added a line echo off above the echo username it resulted in
 ECHO is off. again only from the webpage.
 
 In essense I need to update a DNS server through a web page.  It works
 if the script is local but not if it has to update a different server.
 
 Charles Killmer
 Windows 2000 Server, IIS 5.0, PHP 4.1.0
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail:
 [EMAIL PROTECTED]


-- 



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




Re: [PHP] Create a table with more than 1 column

2001-12-27 Thread David Jackson

Rodrigo ---
This is really an SQL question, not an PHP one? 
What database are you using? On what OS?
For MySQL check this link: 
http://www.mysql.com/doc/A/N/ANSI_diff_SELECT_INTO_TABLE.html

If your running on a Unix server, and is something that runs on a regular
basis (say hourly or daily), you could use a simple shell script and
run it as a cron job.

Hope this helps,
David Jackson



 Hi list,
 
 I am in a big trouble. My deadline is coming and I couldn't solve my
 problem yet! I have this script that outputs a table that can be seen
 at
 http://www.celebnet.com.br/abc.php
 
 $ultletra = '';
 $row = '';
 while($resultado = $query-dados()) {
$curletra = $resultado['letra'];
if($curletra != $ultletra) {
if (!empty($row)) {
   $row .= /tr\n;
}
$row .= tr\ntd\nimg src=\img/letras/$curletra.gif\
 width=\24\ height=\24\\n/td\n/tr\n;
}
$row .= tda
 
href=\interna.php?cat=$resultado[Nome_Categoria]celebID=$resultado[CelebID
 ]\.$resultado['Nome_Artistico']./a/td\n;
$ultletra = $curletra;
 }
 if (!empty($row)) {
   $row .= tr\n;
 }
 
 SQL is:
 
 SELECT 
 
categorias.Nome_Categoria,celebridades.CelebID,celebridades.Nome_Artistico,
 lcase(left(Nome_Artistico,1)) as letra FROM categorias LEFT JOIN
 celebridades ON categorias.CategoriaID=celebridades.Categoria  WHERE
 CategoriaID='1' ORDER BY Nome_Artistico
 
 My problem is that I need to modify the script to output a 3 column
 table. I have tried everything but nothing works, and I've tried also
 all url about PHP that i could found. Please I'll appreciate any help.
 
 Thank's in advance and happy new year to all!!!
 
 Rodrigo Peres (Brazil)
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail:
 [EMAIL PROTECTED]


-- 



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




[PHP] FOLLOW UP:[PHP] Warning: Cannot send session cookie

2001-12-27 Thread David Jackson

Michael (and list) --
I've made the adjustment suggested the scripts are below.
What I'm trying todo is pass the uid and mid to the sales.php script.
It works the first time!! But if I reload sales.html the next record( w/ 
same uid) isn't added or if I login in as a different id the records aren't 
added?
Scripts: login.php and sales.php. 

Thanks for your time and knowledge,
David Jackson

-  login.php ---
?php
// start session
session_start();
session_register(Uid);
session_register(Umid);
// Connect to db
include(/home/sites/www.pickledbeans.com/web/connect.php);

// insert new user
$result = mysql_query(SELECT id,mid,name,perms FROM staff
WHERE name = '$frm_name'); 

if (mysql_num_rows($result)!=1) {
echo Dis ain't good !!\n;
echo htmlbody;
echo meta http-equiv=\refresh\ content=\5; 
url=http://backoffice.pickledbeans.com/index.html\;;
echo /body/html;
mysql_free_result ($result);
mysql_close($link);

} else {
   echo We have winner:\n;

// parse out query output and resign to session vars
 list($id,$mid,$name) = mysql_fetch_row($result);
echo p$id/p;
echo p$name/p;
$Uid = $id;
$Umid = $mid;
$Uname = $name;


// redirect to main menu page
mysql_free_result ($result);
mysql_close($link);
echo htmlbody;
echo meta http-equiv=\refresh\ content=\5; 
url=http://backoffice.pickledbeans.com/sales.html\;;
echo /body/html;

}
?

-- sales.php ---
?php
// If sesssion vars don't exist, goto login form
// else display sales data entry form
session_start();
// if(!session_is_registered(Uid)) {
//echo pWe need to goto login screen!!/p;
// } else { 
echo pSession uid set to:$Uid/p\n;
echo pSession uid set to:$Umid/p\n;
echo pSession date: $frm_date/p\n;
echo pSession amount set to: $frm_amount/p\n;
//
include(/home/sites/www.pickledbeans.com/web/connect.php);
// Insert Sales data into sales table
mysql_query(INSERT INTO sales(id,mid,date,amount)
VALUES('$Uid','$Umid','$frm_date','$frm_amount')) ;
mysql_close($link);

echo htmlbody;
echo meta http-equiv=\refresh\ content=\5; 
url=http://backoffice.pickledbeans.com/sales.html\;;
echo /body/html;
?

 


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




[PHP] RESOLVED(maybe):Warning: Cannot send session cookie

2001-12-27 Thread David Jackson

All --
It appears that the problem was a table design problems,
my primary index wasn't set to auto-increment? So I was trying to
insert records with duplicate keys !!
This of course leads to another question, how do I return SQL error messages
to the browser?

Thanks,
David

-- 



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




[PHP] Warning: Cannot send session cookie

2001-12-26 Thread David Jackson

Greetings --
PHP + MySQL + sessions?

I'm trying use the script( and html page) to below to set session 
variables, but
keep getting the follow errors:
NOTE: I seen several posting re: using $HTTP_SESSION_VAR is another case 
where
that would apply?

Thanks in advance,
David Jackson


 Browser Error Messages -
Warning: Cannot send session cookie - headers already sent by (output 
started at
/home/sites/site13/web/connect.php:13) in
/home/sites/site13/web/frontdesk/sales/login.php on line 15

Warning: Cannot send session cache limiter - headers already sent (output 
started at
/home/sites/site13/web/connect.php:13) in
/home/sites/site13/web/frontdesk/sales/login.php on line 15.


--- login.php -


?php include(/home/sites/www.pickledbeans.com/web/connect.php); ?
?php
$result = mysql_query(SELECT uid,uname,uperms FROM guestusers
WHERE uname = '$uname' 
   AND upass = PASSWORD('$upass')); 

if (mysql_num_rows($result)!=1) {
echo Dis ain't good !!\n;

mysql_free_result ($result);
mysql_close($link);

} else {
// start session
session_start();
session_register(Uid);
session_register(Uname);
session_register(Uperms);

// parse out query output and resign to session vars
list($uid,$uname,$uperms) = mysql_fetch_row($result);
$Uid = $uid;
$Uname = $uname;
$Uperms = $uperms;

// redirect to main menu page
mysql_free_result ($result);
mysql_close($link);
 


- login.html 
html
head
titleGeneric Time Tracker/title
/head
h3Sales Entry Login screen:/h3
table border=0 cellspacing=5 cellpadding=5
form action=login.php method=post
tr
tdUsername:/td
tdinput type=Text name=uname size=15/td
/tr
tr
tdPassword/td
tdinput type=password name=upass size=15/td
/tr
tr
td colspan=2 align=CENTERinput type=Submit name=submit 
value=Enter/td
/tr
/form
/table
/body
/html

-- 



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