Help - Search - Member List - Calendar
Full Version: PHP Sessions
WorkTheWeb Forums > Webmaster Resources > PHP Help
Pages: 1, 2, 3, 4, 5, 6
Support our Sponsors!


^MisterJingo^
"Stephen Reid" <[Email Removed]> wrote in message
news:[Email Removed]
QUOTE
Hello,

I've create a 3 page site using sessions.  I can pass the value from
the login page to the second page but when the user goes to third
page nothing is echoed from the session variables.  I've included the
files so please let me know what I'm doing wrong as I'm just new to
sessions.

Thanks :-)

on each page where session vars are needed to be accessed do you call
session_start(); ?

If so we know the problem doesn't lie there and we can look elsewhere :)

Marc Cuypers
Stephen Reid wrote:

QUOTE
Yep page 3 has the session_start as its included with the included file
(session_header.php), so where else could the problem be as I have no idea?

Thanks :-)


"^MisterJingo^" <[Email Removed]> wrote in message
news:wxXJa.1874$[Email Removed]...

"Stephen Reid" <[Email Removed]> wrote in message
news:[Email Removed]

Hello,

I've create a 3 page site using sessions.  I can pass the value from
the login page to the second page but when the user goes to third
page nothing is echoed from the session variables.  I've included the
files so please let me know what I'm doing wrong as I'm just new to
sessions.

Thanks :-)

on each page where session vars are needed to be accessed do you call
session_start();  ?

If so we know the problem doesn't lie there and we can look elsewhere :)





first page has _POST variables (form)

second doesn't have _POST parameters, only session variables which are
overwritten in session_header.php

--
Marc.

Ian.H [dS]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Whilst lounging around on Fri, 20 Jun 2003 18:54:59 GMT, "Michael
Wilcox" <[Email Removed]> amazingly managed to produce
the following with their Etch-A-Sketch:

QUOTE
Ian.H [dS] <[Email Removed]> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Whilst lounging around on Fri, 20 Jun 2003 08:33:25 +0100,
[Email Removed] amazingly managed to
produce the following with their Etch-A-Sketch:

Eh? - the guy's either got unlimited space or he doesn't, no
matter when you sign up.


No one has "unlimited space". Even with my own server, I don't
have unlimited space... I had a hell of a lot of space... but I'm
still either limited by the size of the HDDs currently installed,
or the size of my wallet.

Anyone offering unlimited space is chatting from the wrong
oriface.

He means that there's no limit on the ammount of files you can put
into your site. If space becomes scarce, he gets more servers.


Of course (hah!!).. until he gets bored with shelling out for
everyone else......

Remember.. _nothing_ in this world is a free lunch =)



Regards,

Ian

-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0

iQA/AwUBPvmNsGfqtj251CDhEQIVAACfeZvXCm5sqDvEr/MKLm8/6VZaQ+wAoOkF
Ik9xmYkM5OndeEslsvI8dZz8
=IbD4
-----END PGP SIGNATURE-----

--
Ian.H [Design & Development]
digiServ Network - Web solutions
www.digiserv.net | irc.digiserv.net | forum.digiserv.net
Programming, Web design, development & hosting.

Stephen Reid
So how do I fix this so they will carry over to the third page. Do I have
to set them to _post variables on the seconds and third pages?

Thanks :-)

"Marc Cuypers" <[Email Removed]> wrote in message
news:Q4gKa.66590$[Email Removed]...
QUOTE
Stephen Reid wrote:

Yep page 3 has the session_start as its included with the included file
(session_header.php), so where else could the problem be as I have no
idea?

Thanks :-)


"^MisterJingo^" <[Email Removed]> wrote in message
news:wxXJa.1874$[Email Removed]...

"Stephen Reid" <[Email Removed]> wrote in message
news:[Email Removed]

Hello,

I've create a 3 page site using sessions.  I can pass the value from
the login page to the second page but when the user goes to third
page nothing is echoed from the session variables.  I've included the
files so please let me know what I'm doing wrong as I'm just new to
sessions.

Thanks :-)

on each page where session vars are needed to be accessed do you call
session_start();  ?

If so we know the problem doesn't lie there and we can look elsewhere
:)





first page has _POST variables (form)
second doesn't have _POST parameters, only session variables which are
overwritten in session_header.php

--
Marc.


South
Try checking on session_name()

"Stephen Reid" <[Email Removed]> wrote in message
news:[Email Removed]...
QUOTE
Hello,

I've create a 3 page site using sessions.  I can pass the value from the
login page to the second page but when the user goes to third page nothing
is echoed from the session variables.  I've included the files so please
let
me know what I'm doing wrong as I'm just new to sessions.

Thanks :-)




lawrence
"John Rock" <[Email Removed]> wrote in message
QUOTE
FORM ACTION="search.asp" METHOD="post" NAME="search"
<B>Search String</B><BR
<INPUT NAME="SearchString"><BR
<INPUT TYPE="submit" NAME="GoSearch" VALUE="Search"> </P
</FORM


Simple enough.  I need to populate the SearchString and send it over to the
ASP
script.  Any way to do this?

On your site you should have a form that submits $value. When
receiving the input of the form, you create a link like this:

$link = "http://www.externalWebsite.com/search.asp?GoSearch=Search&SearchString=$value";

Then you use fopen to open the other site. However, if the code on the
other end excludes GET requests and only allows POST requests, you may
have some trouble.

Paul Liversidge
"Anthony M. Saffer" <[Email Removed]> wrote in message news:<[Email Removed]>...
QUOTE
Hello Everyone,

I'm needing to add a shopping cart and catalogue system to my website and
would like suggestions. Specifically, I need the following features:

1. Product Images
2. Product Description
3. Integrated Shopping cart
4. Payment integration (preferable Paypal but I'm willing to code it in if
necessary)
5. Preferrably free.

I'm pretty sure that oscommerce will fit the bill, it's a SourceForge
project. I've only tentatively looked at the package as the foundation
for an ecommerce site but given my 30 second read it looked like the
right thing for me.

druppel
"Bernd Moon" <bernd@(no-spam)planetmoon.net> schreef in bericht
news:b7evt9$o1h$[Email Removed]...
QUOTE
ga dan naar http://www.web-con.nl :D

"Arjan -- -- -- http://www.pkhe.nl" <info@((nospam))pkhe((nospam)).nl
schreef in bericht news:b7edju$nj$[Email Removed]...


http://chat.msn.com/chatroom.msnw?fMsgr=tr&rhx1
=%2557%2565%2562%256D%2561%2573%2574%2565%2572

hartstikke bedankt voor de link !!



ARMANDO PADILLA
Great Open Source software. Shoul dbe able to find what your looking for
there.

www.sourceforge.net


--
Armando P.
Software Engineer.
Computer Science/Economics, Cailifornia State University Los Angeles
http://www.armando.ws
"Henry Gonzales" <[Email Removed]> wrote in message
news:rw9Oa.26603$[Email Removed]...
QUOTE
Can anyone serious tell me the address of a web site that have free
(freeware) source in PHP for personal web site ?

Henry G


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.495 / Virus Database: 294 - Release Date: 30/06/03




Disco
ӽ wrote:
QUOTE
Hello!!!
I'm use mysql and php.
I'm used to mysql's database into php's arrary.
This is very simple!!!
But, I'm very hard...

I recommend you keep a box of tissues beside your computer when you are
coding in PHP.

Batman
On Tue, 8 Jul 2003 17:51:10 +0800, "Spiderman"
<[Email Removed]> wrote:

QUOTE


Pow, Bash Kapow.....etc...


Henschel
QUOTE
1) which one template is better for my scenario?
smarty or phpLib?

Sorry, don't know. I've never used one of these.
But for your second problem, you only could use JavaScript if the form
should not be submitted for that dynamic thing, because javascript runs
on the client and php on the server.

christian



QUOTE

2) QUESTION using template:
how about this scenario:
Inside a form I have two combos:
the user choice of the first one determines the values shown into the second
one
OR
the user check of a checkbox determines the presence or not of some input
fields
SO
how about html defined dinamically during the user interaction?
how can I define a template for it?

(now I have something like...
if($user_choice=="first")
then
print("<INPUT.....>")!
!#$%!)

many thanks in advance!


laura



rush
"laura" <[Email Removed]> wrote in message
news:begqm7$3ec$[Email Removed]...
QUOTE
**separate logic from pres:
- using template

1) which one template is better for my scenario?
smarty or phpLib?

Hi, to add to confusion, you could also try TemplateTamer, it comes with
development environment suited for template based development, and encourges
OO development.

QUOTE
2) QUESTION using template:
how about this scenario:
Inside a form I have two combos:
the user choice of the first one determines the values shown into the
second
one
OR
the user check of a checkbox determines the presence or not of some input
fields
SO
how about html defined dinamically during the user interaction?
how can I define a template for it?

I think that the javascript variant is more user friendly, but of course you
need to create templates, that you will populate correctly in order to have
proper javascript. Here is an example of such page developed with TT, at the
bottom in the archieve, when you click on some category, javascript shows
advices from that category (without reloading an page). Similar could be
achived for second combo box.

http://www.moj-posao.net/jseeker_lawyer_li...p?languageId=EN

php program connects to the database, and creates proper javascript on the
fly by using templates. (you would for instace have template for one
category, and subtemplates for items in that category, and then you would
repeat whole bunch as many times as you would like).

If you are going to use TT, and get stuck, let me know, and I might offer
some additional advice, if needed.

rush
--
http://www.templatetamer.com/

Eric Kincl
Hey,
As far as templates go, create your own. I have no clue what smarty of
phpLib are, but if you want a site that looks like how YOU want it to
look, then you gotta make your own. Learn some CSS and that will help
you a lot.


-Eric Kincl

Henschel wrote:

QUOTE

1) which one template is better for my scenario?
smarty or phpLib?


Sorry, don't know. I've never used one of these.
But for your second problem, you only could use JavaScript if the form
should not be submitted for that dynamic thing, because javascript runs
on the client and php on the server.

christian




2) QUESTION using template:
how about this scenario:
Inside a form I have two combos:
the user choice of the first one determines the values shown into the
second
one
OR
the user check of a checkbox determines the presence or not of some input
fields
SO
how about html defined dinamically during the user interaction?
how can I define a template for it?

(now I have something like...
if($user_choice=="first")
then
print("<INPUT.....>")!
!#$%!)

many thanks in advance!


laura




Juz
If you can use GD2 library use this function

function create_resampled_image($max_height, $max_width, $image_quality,
$image, $newimage){
$src_img = imagecreatefromjpeg($image);
$orig_x = imagesx($src_img);
$orig_y = imagesy($src_img);

$new_y = $max_height;
$new_x = $orig_x/($orig_y/$max_height);

if ($new_x > $max_width) {
$new_x = $max_width;
$new_y = $orig_y/($orig_x/$max_width);
}

$dst_img = imagecreatetruecolor($new_x,$new_y);
imagecopyresampled($dst_img, $src_img, 0, 0, 0, 0, $new_x, $new_y, $orig_x,
$orig_y);
imagejpeg($dst_img, $newimage, $image_quality);
imagedestroy($src_img);
imagedestroy($dst_img);
}

rush
QUOTE
As far as templates go, create your own.  I have no clue what smarty of
phpLib are, but if you want a site that looks like how YOU want it to
look, then you gotta make your own.  Learn some CSS and that will help
you a lot.

Laura phpLib and Smarty are template enngines (phpLib is actually a library
containing one among other things). So Laura was not asking for html
template, but for engine that drives them.

rush
--
http://www.templatetamer.com/

"Eric Kincl" <[Email Removed]> wrote in message
news:[Email Removed]...

Guillaume JANY
QUOTE
I'm looking for exactly the following script
http://alt-php-faq.org/local/105/.
But the quality of the result is horrible.

replace line $dst_img = imagecreate($new_w,$new_h);
with line $dst_img = imagecreatetruecolor($new_w,$new_h);

you may also build a x2 thumbnail

imagecopyresized($dst_img,$src_img,0,0,0,0,$new_w*2,$new_h*2,imagesx($src_im
g),imagesy($src_img));

and display it with width=$new_w, height=$new_h

Guillaume
www.designerspace.com

s a n j a y
I have written a script for a commercial website to resize images. If you
still want it email me at [Email Removed]

sanjay


"Thr Thomas" <[Email Removed]> wrote in message
news:3f0c927e$0$22092$[Email Removed]...
QUOTE
Hello NG

I'm looking for exactly the following script
http://alt-php-faq.org/local/105/.
But the quality of the result is horrible.
The original pic: http://www.neonthaler.ch/test/moose.jpg
The small pic: http://www.neonthaler.ch/test/moose2.jpg

Has someone a script with the same function and better results?

Thx for your help.
Thomas



Billy
Make sure that you have the Absolute URI for the ACTION parameter

Example:
<FORM ACTION="http://altavista.com/web/results/search.asp" METHOD="post"
NAME="search">
<B>Search String</B><BR>
<INPUT NAME="SearchString"><BR>
<INPUT TYPE="submit" NAME="GoSearch" VALUE="Search"> </P>
</FORM>

Make sure that the textfield name is the same as the variable that the
search engine looks at for the Search Paramters
IE. If it is looking for $Search, change SearchString to Search



John Rock wrote:
QUOTE
I am new to PHP and would like to know if this is doable.

External website has a search feature I will like to access and parse the
results.  The site uses the following html code for the form.

FORM ACTION="search.asp" METHOD="post" NAME="search"
<B>Search String</B><BR
<INPUT NAME="SearchString"><BR
<INPUT TYPE="submit" NAME="GoSearch" VALUE="Search"> </P
</FORM


Simple enough.  I need to populate the SearchString and send it over to the
ASP
script.  Any way to do this?

Thanks for any help,

John



Matteo Sorrenti
Penso di aver capito il problema anche se non riesco a risolverlo,
Explorer cerca di scaricarmi la pagina scarica_file.php invece del file
che gli passo, come faccio a fagli capire che deve scaricarmi il file
$filename?

On Fri, 11 Jul 2003 13:57:17 +0200, Matteo Sorrenti wrote:

QUOTE
Non riesco a fare il download di un file con Explorer, i seguenti script
funzionano alla perfezione sia con Opera che con Mozilla ma mi da il
seguente errore con Explorer:
Internet Explorer was not able to open this Internet site. The requested
site is either unvailable or cannot be found. Please try again later.

cosa c' che non va?

<?php
...
$go = "scarica_file.php";
$to = "?titolo=$titolo&filename=$filename&dimensione=$dimensione"
<a class="linktd" href="$go$to">$filename</a
...
?

#scarica_file.php
<?php
include "inizio_unlock.php";
$titolo = $_GET["titolo"];
$filename = $_GET["filename"];
$dimensione = $_GET["dimensione"];
header("Content-type: Application/octet-stream");
header("Content-Disposition: attachment; filename=$filename");
header("Content-Description: Download PHP");
header("Content-Length: $dimensione");
readfile("archivio/$titolo/$filename");
?


Stuart Millington
On Fri, 11 Jul 2003 15:49:18 +0200, "Rudzik" <[Email Removed]>
wrote:

QUOTE
I have a following problem ...
.... at the bottom of the page on printout is visible line http:// ...
Is  there ANY possibilities to remove this line.

Change the printer settings in your web browser. (No, you can't
change the settings for other people who print your site on their own
computers.)

--
------------------------------------------------------------------
- Stuart Millington ALL HTML e-mail rejected -
- mailto:[Email Removed] http://w3.z-add.co.uk/ -
begin OEisbrokenreadknowledgebaseQ265230

R.J.Bant
Try postnuke at www.postnuke.com, it will run without any troubles on Win
Xp's IIS if you just download the stable win32 binaries (.exe) for php and
mysql.

Roderick
Never argue with an idiot, they drag you down to their level and beat you by
experience

"Kieran Benton" <[Email Removed]> schreef in bericht
news:VrFra.542$[Email Removed]...
QUOTE
Hi,
Does anyone know of a good (preferably free) content management system
that
is easy (ish lol) to get running under IIS?

Kieran



Adam i Agnieszka Gasiorowski FNO
Sandy Lewanscheck wrote:

QUOTE
function replace_uri($str)
{
$pattern =
'#(^|[^"=]{1})(http://|ftp://|mailto:|news:)([^s<>]+)([sn<>]|$)#sm';
return preg_replace($pattern,"\1<a
href="\2\3"><u>\2\3</u></a>\4",$str);
}
$message=htmlentities($message);
$message=replace_uri($message);

will result in

<a
href="http://phpmailer.sourceforge.net/&lt;br"><u>http://phpmailer.sourcefor
ge.net/&lt;br</u></a

and

$message=replace_uri($message);
$message=htmlentities($message);
won't work either.
So i would need a function doing both at the same time.
Any ideas?

Replace the "dangerous" chars with "something
else" in the replace_url function (like '[:lt:]'),
then apply replace_url, htmlentities, then replace the
custom string back into the 'correct' character (using
str_replace, for example).

--
Seks, seksi, seksolatki... news:pl.soc.seks.moderowana
http://hyperreal.info / ALinkA / bOrk! * WiNoNa ) (
http://szatanowskie-ladacznice.0-700.pl foReVeR( * )
Poznaj jej zwiewne ksztaty... http://www.opera.com 007

Voituk Vadim
Show me yours httpd.conf file content beetwen 225 and 255 lines

Shlomi Schwartz
Still waiting for your help.

Thanks :-)

s a n j a y
may be you should try this.

AuthUserFile /your directory/.htpasswd
AuthGroupFile /dev/null
AuthName ByPassword
AuthType Basic

<Limit GET>
require user userName
</Limit>



Sanjay


"Terry" <[Email Removed]> wrote in message
news:D_TQa.1196$[Email Removed]...
QUOTE
Hi,

I used this.......

-------------------------------------------------------
<?php
$username="thisuser";
$password="thispw";
$fhnd = fopen("../.htpw","a");
$crypt_pw = crypt($password);
$newline = $username.":".$crypt_pw."n";
fwrite ($fhnd, $newline);
fclose($fhnd);
?
-------------------------------------------------------

to write to my ../.htpw file (password file).

I then set up this .htaccess in the required directory......

-------------------------------------------------------
DirectoryIndex index.html

AuthUserFile ../.htpw
AuthType Basic

<LIMIT GET POST
require valid-user
</LIMIT

-------------------------------------------------------

Problem........
when I try to access the directory I get the usernamepassword prompt (as
required) but it rejects the thisuserthispw combination.

Any helpexplanation would be most welcome ;-)

mtia



Bob Brown
Look in your webserver's error log file (error_log if you're using Apache)
for any verbose (and very useful) messages like "Couldn't access file" etc.

"Terry" <[Email Removed]> wrote in message
news:D_TQa.1196$[Email Removed]...
QUOTE
Hi,

I used this.......

-------------------------------------------------------
<?php
$username="thisuser";
$password="thispw";
$fhnd = fopen("../.htpw","a");
$crypt_pw = crypt($password);
$newline = $username.":".$crypt_pw."n";
fwrite ($fhnd, $newline);
fclose($fhnd);
?
-------------------------------------------------------

to write to my ../.htpw file (password file).

I then set up this .htaccess in the required directory......

-------------------------------------------------------
DirectoryIndex index.html

AuthUserFile ../.htpw
AuthType Basic

<LIMIT GET POST
require valid-user
</LIMIT

-------------------------------------------------------

Problem........
when I try to access the directory I get the usernamepassword prompt (as
required) but it rejects the thisuserthispw combination.

Any helpexplanation would be most welcome ;-)

mtia



^MisterJingo^
"DUC" <[Email Removed]> wrote in message
news:3f1487ae$[Email Removed]
QUOTE
Hi All,

I want to redirect a page using the Location: header, and at the same
time, pass any $_POST'ed data to that page.

Does anyone know of a way?

Thank You,
DUC

Do you mean pass the data back to the page on which the form exists (which
takes the data from the user) or to pass the data to a new page using the
Location:header method?

If you want the former, simply make a self submitting form, a hidden field
could be used to detect the form has been submitted, so the new section of
html could be outputted rather than the form itself. If its the latter you
have a few options. The first is by attaching the variables to the
Header:location url as using the GET method i.e.
location.php?var1=$var1&var=$var2. If you don't want your address to contain
the variable data, the other method is by invoking a session for the
duration of calling the new page. once the new page is loaded, pull the data
from the session and if its no longer needed, simply destroy it.

Jon Kraft
"Rutger Claes" <[Email Removed]> wrote:

QUOTE
Can I _add_ an include_path from within a program using ini_set.
Do I just have to get the directive using ini_get() and modify the
string so it will include my file directory too?

Yes, ini_get() the current path(s) and ini_set() the current path(s) plus
your new path.

JOn

Jon Kraft
"Sigurd Friisvold" <[Email Removed]> wrote:

QUOTE
Is it possible to set page break in html documents? Want to controll
how the printer break up the document.
Gary Petersen
On Wed, 16 Jul 2003 12:51:44 -0500, Sigurd Friisvold wrote:

QUOTE
Is it possible to set page break in html documents? Want to controll how
the printer break up the document.


Regards, Sigurd!

The only way I know of is using CSS:
<style type="text/css">
..page {
page-break-before: always;
}
</style>

<!-- a page break is below -->
<br class="page">

While the latest Netscape and Microsoft browsers
recognize page-break-before, older browsers
won't.

Sergiu
I think the solution with the session vars is the better and the safest.

Sergiu.

"^MisterJingo^" <[Email Removed]> wrote in message news:<od0Ra.1275$[Email Removed]>...
QUOTE
"DUC" <[Email Removed]> wrote in message
news:3f1487ae$[Email Removed]
Hi All,

I want to redirect a page using the Location: header, and at the same
time, pass any $_POST'ed data to that page.

Does anyone know of a way?

Thank You,
DUC

Do you mean pass the data back to the page on which the form exists (which
takes the data from the user) or to pass the data to a new page using the
Location:header method?

If you want the former, simply make a self submitting form, a hidden field
could be used to detect the form has been submitted, so the new section of
html could be outputted rather than the form itself. If its the latter you
have a few options. The first is by attaching the variables to the
Header:location url as using the GET method i.e.
location.php?var1=$var1&var=$var2. If you don't want your address to contain
the variable data, the other method is by invoking a session for the
duration of calling the new page. once the new page is loaded, pull the data
from the session and if its no longer needed, simply destroy it.


Sarenka
QUOTE
I do have a simple form with sumbit button and action form is php script.
This script simply adds the customer to the mysql database.

But, what if I would like to add another button to delete the customer.
How can I handle running to scripts on one form using two seperate
buttons.


In form:
<INPUT TYPE="SUBMIT" NAME="work" VALUE="Add">

<INPUT TYPE="SUBMIT" NAME="work" VALUE="Delete">



In script:

if ($work == 'Add'') {

add to base


}



if ($work == 'Delete'') {

delete from base


}



This works in my scripts :) Ofcourse use $_POST['work'] or $_GET['work']
instead of $work.
--
Sarenka (ale facet)
http://smiesznostki.prv.pl

To live for perfect 10 minutes...

Bartosz Wegrzyn
thanks a lot
it helped

"Sarenka" <[Email Removed]> wrote in message
news:bf9qfe$n9h$[Email Removed]...
QUOTE
I do have a simple form with sumbit button and action form is php
script.
This script simply adds the customer to the mysql database.

But, what if I would like to add another button to delete the customer.
How can I handle running to scripts on one form using two seperate
buttons.

In form:
<INPUT TYPE="SUBMIT" NAME="work" VALUE="Add"

<INPUT TYPE="SUBMIT" NAME="work" VALUE="Delete"



In script:

if ($work == 'Add'') {

add to base


}



if ($work == 'Delete'') {

delete from base


}



This works in my scripts :) Ofcourse use $_POST['work'] or $_GET['work']
instead of $work.
--
Sarenka (ale facet)
http://smiesznostki.prv.pl

To live for perfect 10 minutes...


Thomas Baker
South wrote:
QUOTE
This an HTML solution, not a PHP one.  It's really quite simple.  Simply
insert the meta-equilivant tag command with name "No-cache".

<meta-equil name="No-cache" contents=""

(equil...??)

Its actually

<meta http-equiv="pragma" content="No-cache">

or

<meta http-equiv="expires" content="0">

I'm not sure if the case of No-cache is relevant and if so if the above
is right or if it should be all lowercase.

T

Thomas Baker
Carina wrote:
QUOTE
I'm trying to show an image that I'm getting from the database. I'm able to
get the instructions for the pictures. But I need to get it into an image
and show it in HTML.

Carina

I don't know if you can do it in PHP but what you want to do is write a
separate page where you set the MIME type of the page to image/gif (or
whatever)* and then write out the bytes of the image (assuming it is the
image you have stored in the db and not just its name/location) then you
can reference this from other pages like:

<img src="/image.php?db_id=324" />


And that gets image 324 from the db. And of course the db_id can be
dynamically generated in the non-image PHP page or even in the image one
if you pass in criteria.

Does that make sense?

T

* = I'm being a bit vague here because I'm not sure exactly what you do
in PHP. There's probably some kind of ResponseType method on the
Response object (if there is such a thing in PHP!)

stephan beal
Eric VIALLE wrote:
QUOTE
I have just installed PHP 4.3 on my Red Hat 8 server.
I sat up some new scripts on my server, but when i submit a formular, his
content is not sent :(
it comes from my server, because my scripts run correctly on other
configurations !

What kind of change have i to do ?

You're used to older PHP versions, aren't you?
The default handling of global vars changed around version 4.1:

http://www.php.net/manual/en/language.variables.external.php
http://www.php.net/manual/en/faq.html.php

--
----- stephan beal
Registered Linux User #71917 http://counter.li.org
I speak for myself, not my employer. Contents may
be hot. Slippery when wet. Reading disclaimers makes
you go blind. Writing them is worse. You have been Warned.

Ian.H [dS]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Whilst lounging around on Tue, 22 Jul 2003 02:38:55 +0100, Liam
<[Email Removed]> amazingly managed to produce the following with
their Etch-A-Sketch:

QUOTE
Hi all, I have recently written a FAQ for the group alt.test and I
created a forum using the PHPBB if anyone is intrested to vist the
address is www.atfaq.uni.cc

Thank you,


And!?

So because the forum has 'php' as part of its title, you decided to
post this crap in this group!?

Get a life kid.



Regards,

Ian

-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0

iQA/AwUBPxz2KGfqtj251CDhEQJkZgCgjcGox1S3dm9YvCm+EXdnxmResJ8AoNxJ
7DxMgZM75eQ1o8cINvPOB7Ko
=GIWe
-----END PGP SIGNATURE-----

--
Ian.H [Design & Development]
digiServ Network - Web solutions
www.digiserv.net | irc.digiserv.net | forum.digiserv.net
Programming, Web design, development & hosting.

Tom
On Tue, 22 Jul 2003 08:30:34 GMT, "Ian.H [dS]"
<[Email Removed]> wrote:

QUOTE
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Whilst lounging around on Tue, 22 Jul 2003 02:38:55 +0100, Liam
<[Email Removed]> amazingly managed to produce the following with
their Etch-A-Sketch:

Hi all, I have recently written a FAQ for the group alt.test and I
created a forum using the PHPBB if anyone is intrested to vist the
address is www.atfaq.uni.cc

Thank you,


And!?

So because the forum has 'php' as part of its title, you decided to
post this crap in this group!?

Yes, it is PHP releated, and unless you can direct me to FAQ of this
group that says otherwise I beileve I am doing nothing wrong. How
would you however like me to report *your* abuse to
[Email Removed] ?

QUOTE
Get a life kid.

I have one, thanks

QUOTE


Regards,

Ian

----
Tom, Creater of the alt.test FAQ.
alt.test FAQ Webpage: www.atfaq.uni.cc
alt.test Forum: www.atforum.uni.cc

Gunnar Steinn
"Declan O'Gorman" <[Email Removed]> wrote in message news:<bdati2$jjd$[Email Removed]>...
QUOTE
Hi,

Is there any way to make a page such that it doesnt sho up in a broswers
history?

okay, heres the situation:

i've got a page that detects if a user have flash 6.0... if so they get
redirted to page A, if not to page B. however if a user then clicks 'back'
they get suck, because they are eternally forward by the index page to
either page A, or page B. so i'd like to make it such that the index page
isnt encountered when clicking 'back'...

any suggestions?

Cheers ppl

Dex

-------
DotInspiration

web: http://www.dotinspiration.co.uk
email: dex*NOSPAM*@dotinspiration.co.uk

Better than these two methods is probably using the header.

<?php

if (userHasFlash()) {
header("Location: http://www.mysite.com/flash.html");
} else {
header("Location: http://www.mysite.com/nonflash.html");
}

?>

No there is no page that the user has to decide flash or nonflash and
the back button works as expected.

Gunnar Steinn

Peter
In article <230720031756451382%[Email Removed]>, Peter
<[Email Removed]> wrote:


Ignore the question about the INSERT. I worked it out. I simply needed
'' around my variables.

laura
newbie...

expath vs libxml2...

libxml2 is an implementation of dom
expath is a sax parser

both comes with php installation (ie 4.3)

both need to have php recompiled:
libxml2 --> --with dom
expath --> --with xml

have I written anything right??
:-(

tks...

Peter
In article <BB44D23C.1660%[Email Removed]>, Verizon
<[Email Removed]> wrote:

QUOTE
Hi,

Can anyone suggest a good script to handle form data? (from a form I build -
HTML) The user inputs data, submits it and it is placed in mySQL database.
I've seen many form processors (on internet i.e. Hotscripts.com) taht are
form to email but not to database. I would like to get one with a good
back-end management page as well. One I can sort data. Perhaps use it for
orders or contact info.

A simple form to text db would be possible. But it's a lot harder to do
a generic form to db program because all dbs are different with
different fields etc.

Mike
Dont use crypt for htpasswd it creates the wrong crypt

best use an exec or passthru

exec "htpasswd /home/admin/.htpasswd etc " user

ther is a flag for addding password directly cant remember look at man
htpass . . . .

bye
"Terry" <[Email Removed]> wrote in message
news:D_TQa.1196$[Email Removed]...
QUOTE
Hi,

I used this.......

-------------------------------------------------------
<?php
$username="thisuser";
$password="thispw";
$fhnd = fopen("../.htpw","a");
$crypt_pw = crypt($password);
$newline = $username.":".$crypt_pw."n";
fwrite ($fhnd, $newline);
fclose($fhnd);
?
-------------------------------------------------------

to write to my ../.htpw file (password file).

I then set up this .htaccess in the required directory......

-------------------------------------------------------
DirectoryIndex index.html

AuthUserFile ../.htpw
AuthType Basic

<LIMIT GET POST
require valid-user
</LIMIT

-------------------------------------------------------

Problem........
when I try to access the directory I get the usernamepassword prompt (as
required) but it rejects the thisuserthispw combination.

Any helpexplanation would be most welcome ;-)

mtia



Mike
I agree

edit your php.ini file and set global vars to ON

bye
"Eric VIALLE" <[Email Removed]> wrote in message
news:bfh4eo$nt5$[Email Removed]...
QUOTE
Hello

I have just installed PHP 4.3 on my Red Hat 8 server.
I sat up some new scripts on my server, but when i submit a formular, his
content is not sent :(
it comes from my server, because my scripts run correctly on other
configurations !

What kind of change have i to do ?

Regards,

Eric VIALLE



aymeric
try http://www.tunga.com/PHP/
myAgenda v2.0 Pro


"Clive Sweeting" <[Email Removed]> a crit dans le message de news:
BB444D5D.4186E%[Email Removed]...
QUOTE
I want a system where users could log into a website, then enter an
important day, like a birthday, and a quick note, then would get sent an
email reminder of that event by the webserver.

Anyone know of a good system to do that? Don't mind if it costs, must run
on
PHP/MYSQL and just chug along in the background sending out the email
reminders. Would be good if it is highly customizable...

TIA


aymeric
Release: 14/02/2002 - Price: Free (GPL) - Platform(s): Win / Linux (needs
cron or similar schedule program)


myAgenda v1.1
A program which is the part of an agenda (We also could call this program as
reminder as well). In this program you would find maybe your all
requirements for a reminder program such as adding, editing, deleting
reminders on the date of you choose, user registration and authorization.
Also you may choose an advance day to reminded. The program will remind you
for whatever you entered whenever you want to be reminded. Once more, it
supports multiple languages. In this version, Turkish and English language
files are included.
In v.1.1, It also sends forgotten passwords to users.

Stephane Kerner
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

"Tom West" <[Email Removed]> a crit dans le message de
news:[Email Removed]...
QUOTE
Not sure if this is quite the right newsgroup, but its the closest I
could find.

I have Redhat Linux 9 and am trying to install Apache & PHP without much
luck. I found a decent enough set of instructions here:
http://www.sysbotz.com/articles/amp.htm but when I type 'make' for the
first time (to make PHP), after a few minutes I get this error message:
Collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1

Well... what kind of installation have you made of RH ?? Any 'standard' as
proposed or the minimal one ?
If you choose the minimal install then some package should be missing such
as gcc etc... have a look at your CD and install the gcc rpm and is
dependencies.

You will also need the following for being comatible with almost everything
developped in PHP:

freetype-2.1.3-6.i386.rpm
gd-1.8.4-11.i386.rpm
gd-devel-1.8.4-11.i386.rpm
libjpeg-6b-26.i386.rpm
libpng-1.2.2-16.i386.rpm

Also be sure to have compiled Apache like this:
- - ./configure --enable-so

Once this done go back to your PHP temporary folder (where you unpacked the
files... I hop you're compiling v4.3.2 !) and do this:

- - make clear (if it reports an error don't care)
- - ./configure --with-gd=/usr --with-apxs2=/usr/local/apache2/bin/apxs
- - make
- - make install
- -cp php.ini-dist /usr/local/lib/php.ini
- - edit httpd.conf and find this: "LoadModule php4_module
modules/libphp4.so" ..... and add this just below " AddType
application/x-httpd-php .php"

The restart Apache and everything should run just fine !

Have Fun !
Stephane.

-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0

iQA/AwUBPyEueY7t8lAtcDudEQI26gCghQthNVVH1HMN+7DLlktsr7NQ4fMAoLK0
ucvNIYNiD5u3ychjOku8FP+O
=5dzS
-----END PGP SIGNATURE-----

Janwillem Borleffs
"Bert" <[Email Removed]> schreef in bericht
news:bg0c8i$siu$1$[Email Removed]...
QUOTE
Hi,

I've just upgraded from php 4.0.6 to 4.2.3 and I'm having a lot of trouble
with image uploads.

....
But now under 4.2.3 this doesn't work. I know that my upload path is
correct
as I can test the contents of the images dir with:


Look for the entry 'disable_functions' in your php.ini, it probably contains
the exec() function.

When it does, have a look at http://www.php.net/move_uploaded_file


JW


PHP Help | Linux Help | Web Hosting | Reseller Hosting | SSL Hosting
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2006 Invision Power Services, Inc.