Re: [PHP-DB] return array

2004-06-25 Thread Sukanto Kho
Yeah I have try that... and when I : echo $field[1]
 appear error msg : "Undefined offset: 1 "

 
- Original Message - 
From: "Sam Chill" <[EMAIL PROTECTED]>
To: "PHP DB Help" <[EMAIL PROTECTED]>
Sent: Saturday, June 26, 2004 11:21 AM
Subject: Re: [PHP-DB] return array


> Instead of 
> return $field[];
> try
> return $field;
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

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



Re: [PHP-DB] return array

2004-06-25 Thread Sam Chill
Instead of 
return $field[];
try
return $field;

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



[PHP-DB] return array

2004-06-25 Thread Sukanto Kho
Hi All, 

how to return array var from function ??

I have try that but just can't return it..

here's my code :(function to return any fields name from table)

   function fields($table,$db_name)
{ $link=$this->database(); // this open the database connection
 $fields = mysql_list_fields($db_name, $table, $link);
  $columns = mysql_num_fields($fields);
  for ($i = 0; $i < $columns; $i++) {
 $field[$i] = mysql_field_name($fields, $i);}
 return $field[];
 }

Thanx a lot
Sukanto


Re: [PHP-DB] PHP with Javascript tutorials?

2004-06-25 Thread Ben Riddell
Hi Chris,
Sorry I can't give you a more full response right now (or the actual code..).
View source from this little form that I built:

It's just a proof of concept, but uses javascript arrays.  A friend of mine 
said he turned the above simple script into modules for both Perl and 
PHP.  I'll check with him to see if they are done and available.

I've been working on a more complicated set of dropdowns that is very 
similar to the sample you described.  I decided against preloading all of 
the arrays, because each one has to be generated by a db call (it's a 
college alumni database, and it only pulls states/counties/provinces where 
alumni actually reside).  So instead of all the db calls and the huge array 
of arrays, I added a javascript onSelect() call to the country drop down 
which actually submits the form, but changes the action of the form to the 
form itself and then adds a new dropdown for state/country/province (and 
preserves anything entered in the other form field elements).

Let me know if you think you need the second option or more Javascript 
details for the first option.

HTH,
-Ben Riddell
At 11:33 AM 6/25/2004, Chris Payne wrote:
Hi there everyone,

I've been looking on Google for PHP Javascript tutorials but I can't find
any.  I'm new to Javascript but can use PHP for what I need.  I was hoping
someone would know of a tutorial that would show how to use PHP to get 2-3
datasets which javascript can then use in forms.  For example, say I have 3
pulldown boxes, one would have countries - such as UK, USA etc .. If you
selected the UK it would bring up countries in the UK, and if you select a
country the third pulldown would show the cities in that country (This is
just an example to hopefully explain what I need) but I don't want the page
to refresh everytime I select an option which it does if you just use PHP.

Any help would be EXTREMELY greatly received :-)

Regards

Chris

--- Ben Riddell 
-- Freelance Web Developer -
--- [EMAIL PROTECTED] ---
--- www.thewhitebear.com ---
--- 510/332.2979 ---



Re: [PHP-DB] Read a PDF file via PHP

2004-06-25 Thread Stut
On Fri, 25 Jun 2004 19:36:11 +, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> 
> Is there any way to get PHP to simply read the PDF file for text only--just the 
> surface of it, just the words, as if it were a human reading the PDF itself--and not 
> for the internal code of the file?

I do this on one of my sites using a utility called pstotext. Find it
at http://research.compaq.com/SRC/virtualpaper/pstotext.html

-- 
Stut

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



Re: [PHP-DB] Read a PDF file via PHP

2004-06-25 Thread Jeffrey Moss
Steve,

You must turn the file to postscript before you can read anything out of it,
and even then, a lot of the time words are broken up into different "show"
statements.

use pdf2ps (part of GNU GhostScript) to convert to PS and then search for
patterns like this:
(text) show
that is the most basic postscript syntax but often it is more complex than
that. The Adobe postscript 3 driver for windows creates all in one lines
with positioning and formatting parameters. So basically, you look for
anything in parenthesis to be text.

For indexing you may get by just looking for anything in parenthesis, but I
would look for a third party utility to do it if you want it done perfectly.

-Jeff Moss

- Original Message - 
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 25, 2004 1:36 PM
Subject: [PHP-DB] Read a PDF file via PHP


> I'm working on a file upload system that accepts PDF files, reads the text
in those files, and enters it into a database, which makes the text  from
the PDF indexable and searchable.
>
> I've got it all down except for the ability to read the text from a PDF
file.
>
> When the PHP read file function is used, the PDF file is read just fine,
but when I return the results to my browser, they're of course nothing but
jumble, because the code for the entire file was read.
>
> Is there any way to get PHP to simply read the PDF file for text
only--just the surface of it, just the words, as if it were a human reading
the PDF itself--and not for the internal code of the file?
>
> Thanks,
> Steve
>
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

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



[PHP-DB] Read a PDF file via PHP

2004-06-25 Thread veditio
I'm working on a file upload system that accepts PDF files, reads the text in those 
files, and enters it into a database, which makes the text  from the PDF indexable and 
searchable.

I've got it all down except for the ability to read the text from a PDF file. 

When the PHP read file function is used, the PDF file is read just fine, but when I 
return the results to my browser, they're of course nothing but jumble, because the 
code for the entire file was read.

Is there any way to get PHP to simply read the PDF file for text only--just the 
surface of it, just the words, as if it were a human reading the PDF itself--and not 
for the internal code of the file?

Thanks,
Steve

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



Re: [PHP-DB] PHP with Javascript tutorials?

2004-06-25 Thread jeffrey_n_Dyke



> Hi there everyone,
Hello.
> I've been looking on Google for PHP Javascript tutorials but I can't find
> any.  I'm new to Javascript but can use PHP for what I need.  I was
hoping
> someone would know of a tutorial that would show how to use PHP to get
2-3
> datasets which javascript can then use in forms.  For example, say I have
3
> pulldown boxes, one would have countries - such as UK, USA etc .. If you
> selected the UK it would bring up countries in the UK, and if you select
a
> country the third pulldown would show the cities in that country (This is
> just an example to hopefully explain what I need) but I don't want the
page
> to refresh everytime I select an option which it does if you just use
PHP.

Since they are two seperate languages, all you can really do is use PHP to
write dynamic Javascript or assign values to javascript variables with
php..  if you want the drop downs to be dynamic then you'll need to write a
function that makes a database call, gathers all the data and then writes
it to static arrays in a file that you can then read with Javascript and
create the drop downs from the arrays.

They are seperate, don't think of them as being able to work together to
much.  except that you can build JS using PHP.

HTH
Jeff

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



[PHP-DB] PHP with Javascript tutorials?

2004-06-25 Thread Chris Payne
Hi there everyone,

 

I've been looking on Google for PHP Javascript tutorials but I can't find
any.  I'm new to Javascript but can use PHP for what I need.  I was hoping
someone would know of a tutorial that would show how to use PHP to get 2-3
datasets which javascript can then use in forms.  For example, say I have 3
pulldown boxes, one would have countries - such as UK, USA etc .. If you
selected the UK it would bring up countries in the UK, and if you select a
country the third pulldown would show the cities in that country (This is
just an example to hopefully explain what I need) but I don't want the page
to refresh everytime I select an option which it does if you just use PHP.

 

Any help would be EXTREMELY greatly received :-)

 

Regards

 

Chris



[PHP-DB] Re: Php form & row delete problems

2004-06-25 Thread Torsten Roehr
"Vincent Jordan" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I have a table that display's a list of users in a mysql db. In the table
I
> have a echo "
> {$row[$username]}, {$row[$password}, {$row[$isactive]};
>
> ( this is not the exact code but its pretty close. )
>
> What I would like to accomplish is after query and print rows. Each row
has
> a check box and if the box is checked and delete button is clicked it is
> passed to userdel.php which would take the user_id and delete row.
>
> Any help would be greatly appreciated.

Write your checkbox the following way:
echo "";

After submitting $_POST['users'] will be an array containing all selected
user ids. You can then just loop through and do your delete queries:

foreach ($_POST['users'] as $user_id => $value) {
$query = 'DELETE FROM table where user_id = ' . $user_id;
// commit query
}

Hope this helps,

Torsten Roehr

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



Re: [PHP-DB] Re: SQL injection & prepared statements

2004-06-25 Thread Gerard Samuel
On Friday 25 June 2004 01:03 pm, Hans_L wrote:
> Gerard Samuel wrote:
> 
>
> > So Im guessing that this is how "prepared" statements are done on other
> > databases.
> >
> > After being trained to do it one way (always escaping "bad" content), Im
> > being shown to do it the other way, and Im looking for any suggestions
> > you may have.
>
> Yes, the idea with prepared statements is that the database (or
> transport layer, etc.) knows how to properly escape the values.

Thanks for your reply.  I wasn't sure who was respondsible for "cleaning up" 
data sent to the db.  So I guess Ill continue with the thought that 
prepared statements (in databases that can use it) takes care of it.
Thanks

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



[PHP-DB] Re: Date Select

2004-06-25 Thread Gerben
select * from table where TO_DAYS(date_field) > ( TO_DAYS(NOW()) -7 )

this will give the entries of the last 7 days (and the ones that are in the
future)

"Tom Chubb" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> How can I query a MySQL table to get the latest results from a date field?
> Basically, I am inserting several records at a time at the end of each
week.
> I want to have a page that displays the results for the last week only.
> The date format in the field is -MM-DD
>

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



[PHP-DB] Re: SQL injection & prepared statements

2004-06-25 Thread Hans_L
Gerard Samuel wrote:

So Im guessing that this is how "prepared" statements are done on other 
databases.

After being trained to do it one way (always escaping "bad" content), Im being 
shown to do it the other way, and Im looking for any suggestions you may 
have.
Yes, the idea with prepared statements is that the database (or
transport layer, etc.) knows how to properly escape the values.  This is
possible in PHP abstraction layers also.  For example, in Creole [1],
which emulates prepared statements for most databases that it supports,
you also don't need to escape things yourself (in fact doing so will
cause problems):
  $stmt = $conn->prepareStatement('SELECT * FROM mytable WHERE col=?");
  $stmt->setString(1, $raw_string_data);
Internally, the string will be escaped using functions like
mysql_escape_string() -- or whatever native function is for your rdbms.
Other layers like MDB [2] also support emulated prepared statements,
which provide the same sort of behind-the-scenes escaping.
I think PreparedStatements are a better solution than building SQL
yourself, because it's easy to forget that you can't trust the types of
variables in PHP.
For example, consider this example:
$sql = "UPDATE mytable
SET textfield = '" . mysql_escape_string($text) . "'
WHERE   id = " . $id;
Sure, the $text is being quoted, but what about $id ! Mistakes like this
are easy to make because at least when I look at it my first instinct is
"yeah id is an integer, therefore a number, doesn't need to be escaped".
 Of course it could just as well be "1 OR 1 = 1" which would update
every row in the db...   Prepared statements and prepared statement
emulators help make that impossible -- and the resulting SQL will be
much easier to read.
-Hans
[1] http://creole.phpdb.org
[2] http://pear.php.net/package/MDB
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] Re: Date help needed

2004-06-25 Thread Rui Cunha
Hope this helps: 



$days_2_search = array ( 1 => "Fri" , 2=>"Sun" , 3=>"Tue");
$num_days = 365; 

$day = (int) date("d");
$month = (int) date("n");
$year = (int) date("Y"); 

echo "
"; 

for ($i = 1 ; $i <= $num_days;  $i++) {
	
		
		
$loop_day = date("D", mktime(0, 0, 0, $month, $day, $year) );
	
	if ( in_array ("$loop_day" , $days_2_search) )
			
	echo " " . date("D M j Y", mktime(0, 0, 0, $month, 
$day, $year)) . " ";
		

			
	if (++$day > 31 || !checkdate($month,$day,$year) ) {
	
		$day = 1;
			
		if (++$month > 12 ) {
$month = 1;
++$year;	
		}
		
	}
	
		
} 

echo ""; 

?> 

Rui Cunha 

Daniel Clark writes: 

A drop down with 365 days !?!?   Isn't that a "little" big? 

I have a problem, I currently have some code which populates a dropdown
box
- this code gives me every day for the next x amount of days (EG: a years
worth of days), however what I really need to be able to do, is to find a
way to display this data in the dropdown box but ONLY show 3 days a week,
IE: Mondays, Fridays and Sundays, so it would show the dates for each
Monday, Friday and Sunday for X amount of days (IE: 365 days in the
dropdown). 


Does anyone have any idea how to do this?  I would really appreciate any
help, I'd send my sample code only I'm not at my home/work computer ATM.

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


[PHP-DB] Php form & row delete problems

2004-06-25 Thread Vincent Jordan
I have a table that display's a list of users in a mysql db. In the table I
have a echo "
{$row[$username]}, {$row[$password}, {$row[$isactive]};

( this is not the exact code but its pretty close. )

What I would like to accomplish is after query and print rows. Each row has
a check box and if the box is checked and delete button is clicked it is
passed to userdel.php which would take the user_id and delete row. 

Any help would be greatly appreciated.

Vincent Jordan
Technical Support
Smart Parts, Inc.
Loyalhanna Business Complex
100 Station Street
Loyalhanna, PA 15661
800-992-2147

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



RE: [PHP-DB] Date help needed

2004-06-25 Thread Kenny
Hi Neil,

I would actually like to get a sample of this code as well if you don't
mind

K-

-Original Message-
From: Neil Smith [MVP, Digital media]
[mailto:[EMAIL PROTECTED] 
Sent: 25 June 2004 16:22
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Date help needed

No, it's actually very easy to do the autocomplete once you get the hang
of 
it. Actually the way I've done it is to populate a multi-select box but
you 
could also use a DIV and write out the values

Dump the email addresses as an XML file (generate this dynamically) then

use XSLT to read out matching rows on each keyup ... basically you
filter 
the XML file each time till you get down to one value

Yes, it's javascript but it works really well as long as you have some 
control over your client browser (in the case of your boss, probably IE
but 
it can be made to work in mozilla / firefox too)

Mail me offlist if you want a working example.

Cheers - Neil

At 11:07 25/06/2004 +, you wrote:
>Message-Id: <[EMAIL PROTECTED]>
>From: "Chris Payne" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Date: Thu, 24 Jun 2004 22:53:13 -0400
>MIME-Version: 1.0
>Content-Type: text/plain;
> charset="us-ascii"
>Content-Transfer-Encoding: 7bit
>Subject: RE: [PHP-DB] Date help needed
>
>One thing he wanted which I didn't know how to do (Javascript I guess
which
>I don't know much about) was to preload a database of email address,
and as
>he started to type an email address it would do a sort of
auto-complete, but
>have no clue how to go about that so just told him not viable ATM.



CaptionKit http://www.captionkit.com : Production tools
for accessible subtitled internet media, transcripts
and searchable video. Supports Real Player, Quicktime
and Windows Media Player.

VideoChat with friends online, get Freshly Toasted every
day at http://www.fresh-toast.net : NetMeeting solutions
for a connected world.

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

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



Re: [PHP-DB] Date help needed

2004-06-25 Thread Neil Smith [MVP, Digital media]
No, it's actually very easy to do the autocomplete once you get the hang of 
it. Actually the way I've done it is to populate a multi-select box but you 
could also use a DIV and write out the values

Dump the email addresses as an XML file (generate this dynamically) then 
use XSLT to read out matching rows on each keyup ... basically you filter 
the XML file each time till you get down to one value

Yes, it's javascript but it works really well as long as you have some 
control over your client browser (in the case of your boss, probably IE but 
it can be made to work in mozilla / firefox too)

Mail me offlist if you want a working example.
Cheers - Neil
At 11:07 25/06/2004 +, you wrote:
Message-Id: <[EMAIL PROTECTED]>
From: "Chris Payne" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Date: Thu, 24 Jun 2004 22:53:13 -0400
MIME-Version: 1.0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
Subject: RE: [PHP-DB] Date help needed
One thing he wanted which I didn't know how to do (Javascript I guess which
I don't know much about) was to preload a database of email address, and as
he started to type an email address it would do a sort of auto-complete, but
have no clue how to go about that so just told him not viable ATM.


CaptionKit http://www.captionkit.com : Production tools
for accessible subtitled internet media, transcripts
and searchable video. Supports Real Player, Quicktime
and Windows Media Player.
VideoChat with friends online, get Freshly Toasted every
day at http://www.fresh-toast.net : NetMeeting solutions
for a connected world.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] SQL injection & prepared statements

2004-06-25 Thread Gerard Samuel
Just looking for opinions on sql injection while using prepared statements.
I've read at the oci8 extention that content should not be "escaped"
---
 Do not use magic_quotes_gpc or addslashes() and oci_bind_by_name() 
simultaneously as no quoting is needed and any magically applied quotes will 
be written into your database as oci_bind_by_name() is not able to 
distinguish magically added quotings from those added intentionally. 
---

I've also been told something similar to this from the author of the ODBTP php 
extention (http://odbtp.sourceforge.net/). 

So Im guessing that this is how "prepared" statements are done on other 
databases.

After being trained to do it one way (always escaping "bad" content), Im being 
shown to do it the other way, and Im looking for any suggestions you may 
have.

Thanks.

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



[PHP-DB] Re: Date Select

2004-06-25 Thread pete M
select * from table where week(date_field) = ( week(now()) -1 )
Tom Chubb wrote:
How can I query a MySQL table to get the latest results from a date field?
Basically, I am inserting several records at a time at the end of each week.
I want to have a page that displays the results for the last week only.
The date format in the field is -MM-DD
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP-DB] Date Select

2004-06-25 Thread Tom Chubb
Jeffrey,
Thanks for this,
I've just realised that it's always the same no of inserts, so perhaps I
should just order by date then my previous sort field and then limit the
result to 20?
(It's all 20 results that I need displayed)
Thanks,
Tom


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 25 June 2004 12:15
To: Tom Chubb
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Date Select





>How can I query a MySQL table to get the latest results from a date field?
>Basically, I am inserting several records at a time at the end of each
week.
>I want to have a page that displays the results for the last week only.
>The date format in the field is -MM-DD


if you want the latest row -
  select * from table order by max(date_column) limit 1;

if you want rows in a range of dates there are lots o ways, and instead of
showing one or two, I'd suggest taking a look at the manual on dates
http://dev.mysql.com/doc/mysql/en/Date_and_time_functions.html, and seeing
what fits your needs best.  Seems like you may want to look at BETWEEN

And if you don't want to use those, you are always free to use
  select * from table where date_column < '-mm-dd' and date_column
< '-mm-dd' order by date_col desc

HTH
Jeff

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

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



[PHP-DB] Re: Date Select

2004-06-25 Thread Torsten Roehr
"Tom Chubb" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> How can I query a MySQL table to get the latest results from a date field?
> Basically, I am inserting several records at a time at the end of each
week.
> I want to have a page that displays the results for the last week only.
> The date format in the field is -MM-DD

Please go to the mysql.com website, search for "date" and you'll find a
detailed description of how to query date columns.

Regards, Torsten Roehr

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



Re: [PHP-DB] Date Select

2004-06-25 Thread jeffrey_n_Dyke



>How can I query a MySQL table to get the latest results from a date field?
>Basically, I am inserting several records at a time at the end of each
week.
>I want to have a page that displays the results for the last week only.
>The date format in the field is -MM-DD


if you want the latest row -
  select * from table order by max(date_column) limit 1;

if you want rows in a range of dates there are lots o ways, and instead of
showing one or two, I'd suggest taking a look at the manual on dates
http://dev.mysql.com/doc/mysql/en/Date_and_time_functions.html, and seeing
what fits your needs best.  Seems like you may want to look at BETWEEN

And if you don't want to use those, you are always free to use
  select * from table where date_column < '-mm-dd' and date_column
< '-mm-dd' order by date_col desc

HTH
Jeff

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



RE: [PHP-DB] [PHP]: session problem

2004-06-25 Thread Ford, Mike [LSS]
On 24 June 2004 16:44, H. J. Wils wrote:

> this is the code, but this code works on my hosting provider but not
> on my own server. I think i have to change settings in php.ini but
> dont know which...
> first page:
> 
> session_start();
> 
> include "connect.php";
> include "functions.php";
> 
>   $user= $_GET["email"];
>   $ww = $_GET["ww"];
> 
>   $check_user_query = "select id,email, password from user where
> email='$user' and password='$ww'";
>   $check_user_res = mysql_query($check_user_query) or
> die(mysql_error().": $check_user_query");
> 
>   if (mysql_num_rows($check_user_res) == 1){
>  //user is ingelogd
> 
>$userdata =
> mysql_fetch_array($check_user_res);
>$sid=session_id();
>$uid=$userdata["id"];
>$_SESSION['logged_in'] = true;
>$_SESSION['sid'] = $sid;
>$_SESSION['user'] = $uid;
> 
>$dt = date("Y-m-d H:i:s");
> 
>  header("location: user.php?action=0");
>   }else{
>  header("location: user.php?action=9");
>   }

Redirecting like this will not pass the session id in the URL if that is
necessary, which it would be if cookies are not being used.  Since you say
it works for you from your provider's system but not your local one, this
suggests that your provider has session.use_cookies turned on, but you have
it turned off.

If this is so, you can solve your immediate problem by turning that option
on in your php.ini, but the redirects will still not work correctly for
anyone who has cookies turned off in their browser.  If you are bothered
about this, you need to make use of the handy-dandy SID constant that PHP
helpfully provides, thusly:

  header("Location: user.php?action=0&".SID);

or, if you're a tidy-URL geek, something like:

  header("Location: user.php?action=0".(SID?"&".SID:""));

(BTW, notice the correct spelling of the "Location" header, with a capital
L; and, yes, others are right when they say it should be a full absolute
URL.  These things have been known to matter to some browsers, so it's best
to make a habit of getting them right!)

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Headingley Campus, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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



[PHP-DB] Date Select

2004-06-25 Thread Tom Chubb
How can I query a MySQL table to get the latest results from a date field?
Basically, I am inserting several records at a time at the end of each week.
I want to have a page that displays the results for the last week only.
The date format in the field is -MM-DD


Re: [PHP-DB] SSL with MySQL 4.0

2004-06-25 Thread Rinku
I dont know much abt SSL .
But pls check the URL, I hope it wd be useful to you.
 
http://support.microsoft.com/?kbid=314864

Edgar Hassler <[EMAIL PROTECTED]> wrote:
Does PHP support SSL connections to MySQL? If no, does anyone have an idea
how to make an SSL conncetion to MySQL using PHP?
Thanks,
Edgar Hassler

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



-
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.