Justin French propably said:
> In order to set and then check a cookie, you need to go through a
> page... so you'd have to set something in the URL like ?cookieset=1
> anyway, in order to knwo you had set it, in order to check it.
>
> In other words, you'll need some guff in the URL, in order f
Justin French propably said:
> You'd loose session for those without cookies. The work around for
> this would be to hard-code the session ID to all URLs across your
> site for all pages you wish to carry a session through -- a real pain.
Indeed.
> It HAS TO use a session ID from the first pag
To reply to myself .)
I disabled trans_sid on the actual site by using:
ini_set('session.use_trans_sid',false);
session_start();
But i still want to know what trans_sid does for me. What am i missing out
on when not using it?
- D, loves google
--
PHP General Mailing List (http://www.php.n
John W. Holmes propably said:
> Do you have a session_start() on the page? It looks like you have a
> trans_sid enabled. PHP will add that to all of your URLs
> automatically. Can you disable it in php.ini?
Yes trans_sid is enabled and i have a session_start on the page. What is
trans_sid doing
Thanks guys! That did the trick. Time to study these sessions a bit more
thourough it seems :)
Another thing - the first time the page is loaded every link on the page
gets a '?PHPSESSID=...etc...' attached to itself. But only the first time.
It dissapears after the first click i make.
I've neve
John W. Holmes propably said:
> Is register globals on or off?
On.
Now - without doing anything - i managed to change the value of $lang to
'en' with a link (pagesname.php?lang=en). But i can't change it back with
?lang=se. Should i get someting to eat to get my brain working?
- D
--
PHP
Guys,
i've been away for a while - enjoying a much needed vacation in lovely
Hungary and expanding my company. Now im back to bother you with easy
questions ;)
I am doing a small site multilingual and will display different content
depending on what language the user choses. When the user comes
> Yes, there is a way to do it without using any forms. I may be able to
> help you better if you could show me the relevant code -- I'm not sure
> if what I have in mind is really applicable to what you want to do.
It´s not really advanced:
session_start();
session_register('text_size');
if (
> You could use a form and have a hidden vield that contains a value. The
> user would have to click the submit button for the variable/value to carry
> over though.
I thought about that. But i have two possible values (via two links) that
could be passed and i can´t really get it together. Two
destination page.
Any pointers on how i can do this?
Regards
# Daniel Alsén| www.mindbash.com #
# [EMAIL PROTECTED] | +46 705 38 10 30 #
# ICQ: 63006462 | +46 8 694 82 22 #
# PGP: http://www.mindbash.com/pgp/ #
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http
forced to deny receipts from a mailing list.
# Daniel Alsén| www.mindbash.com #
# [EMAIL PROTECTED] | +46 705 38 10 30 #
# ICQ: 63006462 | +46 8 694 82 22 #
# PGP: http://www.mindbash.com/pgp/ #
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net
Hi,
my webhost offers wildcard dns for subdomains. However - the subdomains only
redirects from sub.domain.com to domain.com/sub.
I want to cloak the url to remain sub.domain.com. Is there any easy way to
do that with a php-snipplet?
Regards
# Daniel Alsén| www.mindbash.com #
# [EMAIL
Hi!
Which function should i turn on in the PHP installation to get rid of
variables being sent in the url (if i don´t explicitly want them there of
course)?
- D
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
how do i display return values from functions?
Ie i want to see whether mail() returns TRUE or FALSE.
- D
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
You don´t have to register anywhere. You don´t even have to add a copyright
notice. But if you do you are signalling that the content of the website is
protected by copyright laws. No more complicated than that...
- D
- Original Message -
From: "Dani" <[EMAIL PROTECTED]>
To: <[EMAIL PRO
Read this article at PHPbuilder:
http://www.phpbuilder.com/columns/akent2610.php3
- D
- Original Message -
From: "Uma Shankari T." <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 19, 2002 9:50 AM
Subject: [PHP] Difference between two dates
>
>
> Hello,
>
Don´t really want to bother you with these quickies - but:
If i have a result from mysql that is a date (2002-02-09) - how do i change
that into a variable with only the first 7 characters (2002-02)?
Thanks
# Daniel Alsén| www.mindbash.com #
# [EMAIL PROTECTED] | +46 704 86 14 92 #
# ICQ
Thanks guys!
- Daniel
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
i can´t seem to get my head to wake up...
How would i do to count how many different values that exists in a mysql
field? Ie i have a date-field and need to know how many different dates that
exists in the table.
Regards
# Daniel Alsén| www.mindbash.com #
# [EMAIL PROTECTED] | +46 704
y2] => value2).
How would i do that? Does the loop behave the same way - running until the
array is out of data?
Thanks!
# Daniel Alsén| www.mindbash.com #
# [EMAIL PROTECTED] | +46 704 86 14 92 #
# ICQ: 63006462 | +46 8 694 82 22 #
# PGP: http://www.mindbash.com/pgp/ #
--
PHP Gene
Hi,
i know i have this answered before. But i can´t find that mail in the
archive.
How do i print an array to see both the structure and the data within?
("test" => "value", "test2" => "value2")...
# Daniel Alsén| www.mindbash.com #
# [EMAIL PR
Thanks. I knew that - really. Meltdown upstairs :)
- D
> -Ursprungligt meddelande-
> Från: Jason Wong [mailto:[EMAIL PROTECTED]]
> Skickat: den 20 januari 2002 18:53
> Till: Daniel Alsén; PHP List
> Ämne: Re: [PHP] Number of rows reurned?
>
>
> On Monday 21 Ja
Hi,
how can i get the number of rows reuturned by this query?
$sql = "select date from statistik where shooter='$shooter_login' group by
date";
I want to add a page function and limit the returned rows on each page - but
i can´t get the total number of rows.
Re
approach this? I obviously need some sort of function that can
check todays date and count how many months it needs to print from the given
startdate.
Thanks
# Daniel Alsén| www.mindbash.com #
# [EMAIL PROTECTED] | +46 704 86 14 92 #
# ICQ: 63006462 | +46 8 694 82 22 #
# PGP: http
> I don't know if this is actually it, but the line
> $num_vals[$i] = mysql_fetch_array($result);
> seems strange to me - doesn't mysql_fetch_array return an array?
> You should try
> list($num_vals[$i]) = mysql_fetch_array($result);
> and see if you get any improvements...
No, that was not it. I
{
echo "$key : $value";
}
But this works even worse...it seems to stop populating the array (or
counting the values) after only a couple of rows from the db. The result
looks like:
3 : 4
5 : 2
7 : 2
9 : 2
And there should be alot more of those keys...and a couple of keys more as
well.
Hi!
How do i echo the return values of array_count_values?
Regards
# Daniel Alsén| www.mindbash.com #
# [EMAIL PROTECTED] | +46 704 86 14 92 #
# ICQ: 63006462 | +46 8 694 82 22 #
# PGP: http://www.mindbash.com/pgp/ #
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe
Hi,
i still need help with this query:
$t = 7;
$shot_counts = "SELECT COUNT(*) FROM statistik WHERE shooter='$shooter_login' AND
(shot_one = '$t' OR shot_two = '$t' OR shot_three = '$t' OR shot_four = '$t' OR
shot_five = '$t')";
It doesn´t return the correct count. I have tried to tweak the s
27; && shot_two = '$t') ||
(shooter='$shooter_login' && shot_three = '$t') || (shooter='$shooter_login'
&& shot_four = '$t') || (shooter='$shooter_login' && shot_five = '$t')";
I am really stuck.
ooter='$shooter_login' && shot_four = '$t' || shooter='$shooter_login' &&
shot_five = '$t'";
$results = mysql_query($shot_counts);
$bam = mysql_fetch_array($results);
# Daniel Alsén| www.mindbash.com #
# [EMAIL PROTECTED] | +4
] => 8 [COUNT(*)] => 8 )
[9] => Array ( [0] => 9 [COUNT(*)] => 9 ) )
Ideas?
Regards
Daniel
> -Original Message-----
> From: Jack Dempsey [mailto:[EMAIL PROTECTED]]
> Sent: den 13 december 2001 16:30
> To: Daniel Alsén; PHP
> Subject: RE: [PHP] Can i do this?
>
&g
'$shooter_login' && shot_three = '$i' ||
shooter='$shooter_login' && shot_four = '$i' || shooter='$shooter_login' &&
shot_five = '$i'";
$result = mysql_query($shot_count);
$num_vals[$i] = mysql_fetch_array($r
Hi,
i when i run a script that contains a bcdiv() calculation i get this error:
Call to undefined function: bcdiv()
I am using bcdiv() successfully in other scripts. However i vaguely remember
getting an error message some time for some operation in bcdiv...
Any ideas?
Regards
# Daniel Alsén
, very much, appreciate a tip on where i could learn how to
master arrays. I am tearing my hair out here.
Regards
# Daniel Alsén| www.mindbash.com #
# [EMAIL PROTECTED] | +46 704 86 14 92 #
# ICQ: 63006462 | +46 8 694 82 22 #
# PGP: http://www.mindbash.com/pgp/ #
--
PHP General Mailing Lis
stored).
Can i do this in a smart way without having to write fifty queries and add
every fifth of them up?
Regards
# Daniel Alsén| www.mindbash.com #
# [EMAIL PROTECTED] | +46 704 86 14 92 #
# ICQ: 63006462 | +46 8 694 82 22 #
# PGP: http://www.mindbash.com/pgp/ #
--
PHP General
Hi,
i have a MySql table with five columns that are filled with different
numerical values. I need some pointers to where i can learn how to build
statistics out of this data (ie the average value of a column, how many
instances there is of a certain value etc).
Regards
# Daniel Alsén
Hi,
i know this has been asked before - but:
When i add entries to MySql (varchar and text) all " and ' gets a slash in
front of them. How do i get rid of these slashes?
Regards
# Daniel Alsén| www.mindbash.com #
# [EMAIL PROTECTED] | +46 704 86 14 92 #
# ICQ: 63006462 | +46 8
> You should really be storing your dates as datetime so you can take
> advantage of the date sorting functions. But then you'd need to use
> date() to format the string into -mm-dd format.
Thanks Jim.
but how would i actually do that? I have studied the date() function in the
manual - but c
Thanks guys...
I guess it´s too late here now .) It fixed itself when i altered the field
type to varchar. Although - i don´t really get why it can´t store the vlaue
i am sendding it the field is of integer type.
- Daniel
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mai
user_birthdate, user_city, user_mail, user_icq,
user_msn, user_www, user_login, user_password) ";
$query .= " values('$user_name', '$user_birthdate', '$user_city',
'$user_mail', '$user_icq', '$user_msn', '$user_www', '
Thanks for all the help guys! I am sure i will solve this when i have a go
at it again :)
- Daniel
--
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 P
-statements, the header
will never know when to be sent.
Is there a way of calling a headerfunction in the top of the page?
- Daniel
> -Original Message-
> From: Christian Dechery [mailto:[EMAIL PROTECTED]]
> Sent: den 25 november 2001 18:41
> To: Daniel Alsén; PHP; Mi
> 2. User fills in a form, clicks "submit" which calls the same script,
> passing itself the values. Depending on the value passed by the submit
> button, the script processes the information (INSERT or UPDATE) and sets
> $done = 1 if successful.
>
> The second scenario is easier to handle.
> Call
- what do i do?
Regards
# Daniel Alsén| www.mindbash.com #
# [EMAIL PROTECTED] | +46 704 86 14 92 #
# ICQ: 63006462 | #
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact
> How about:
>
> if (substr($url,0,7) <> "http://";)
> $url = "http://"; . $url;
Thanks!
That´s just the function i am looking for. I looked it up in the manual.
Correct me if i am wrong - if i don´t set the second parameter in substr it
just continues to read until the variable is finished?
ter i determined if there is a http:// in the variable or not i guess i
just have to $url = "http://"; + $url; (?)...
Regards
# Daniel Alsén| www.mindbash.com #
# [EMAIL PROTECTED] | +46 704 86 14 92 #
# ICQ: 63006462 | #
--
PHP General Mailing List (http://w
sion_start();
- Daniel
> -Original Message-
> From: R'twick Niceorgaw [mailto:[EMAIL PROTECTED]]
> Sent: den 16 november 2001 15:40
> To: Daniel Alsén
> Subject: Re: [PHP] Session problem
>
>
> I think you can set a new session id using session_start()
> so if you ne
there only seems to be functions to unset or unregister the actual
data inside the session - not the id itself.
Any ideas?
Regards
# Daniel Alsén| www.mindbash.com #
# [EMAIL PROTECTED] | +46 704 86 14 92 #
# ICQ: 63006462 | #
--
PHP General Mailing List (http
was dead links).
Regards
# Daniel Alsén| www.mindbash.com #
# [EMAIL PROTECTED] | +46 704 86 14 92 #
# ICQ: 63006462 | #
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To
Hi,
does anyone have the script that is supposed to be stored at
http://hrs.rics.ru/?
Or does anyone know of any other hotel booking system or a similar script in
php? I am mainly interested in the concept of the system. Database relations
and buildup.
Regards
# Daniel Alsén
Could i have a hint of what you have done Jon?
- Daniel
> Totally incorrect. I have a page on our intranet that checks whois
> information against about 10 whois servers. Right at the top of
> the page it
> says "Checking". As soon as a response comes back from a
> whois server it
> shows
> I agree with you Derek,
> It also depends on the webserver and your connection speed...
>
> perhaps the pages is already parsed and processed but your connection is
> slow somehow and you're getting the page partially as if it is beeing show
> while it is beeing processed/parsed.
Actually i kno
> Is your script really taking that long to be parsed that you need
> a loading
> progress bar or is the html (including graphics etc) just very big?
Parts of the page is rather heavy loaded. The main php file loads fine and
displays it´s contents until it reaches one of the heavy includes (heavy
ivision's code:
> style='left:0;top:0;width:1000;height:1000;position:absolute;z-ind
ex:1000;ba
> ckground:black'>Please wait
>
>
>
>
>
> function hidelayer()
> {
> if(document.all)
> document.all['loadinglayer'].style.visibility
Hi,
is there a easy way in php to display text like "Loading..." while elements
on a page is being loaded from the server?
Regards
# Daniel Alsén| www.mindbash.com #
# [EMAIL PROTECTED] | +46 704 86 14 92 #
# ICQ: 63006462 | #
--
PHP General Mailing
quot;9", "09", $month);
}
if ($date < 10) {
$date = str_replace("1", "01", $date);
$date = str_replace("2", "02", $date);
$date = str_replace("3", "03", $date);
$date = str_replace("4", "04", $d
> A quick look at the REPLACE syntax tells me that
>
> "REPLACE works exactly like INSERT, except that if an old record in the
> table has the same value as a new record on a unique index, the old
> record is deleted before the new record is inserted."
>
> So if id isn't a unique index, you could
form and that part is working.
In the actual query i REPLACE the value of show_id:
$query = "REPLACE INTO puff";
$query .= "(id, show_id)";
$query .= " values('$fid''$show_id')";
I am sure it´s a simple solution. But p
How do i send the user on to another page at the end of the execution of a
script?
# Daniel Alsén| www.mindbash.com #
# [EMAIL PROTECTED] | +46 704 86 14 92 #
# ICQ: 63006462 | #
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED
content);
What i find strange is that the search only works on the actual text in the
html-document. It doesn´t seem to be able to use htmltags as $begin or $end.
And another question: does the "search" of $end begins from $begin? Or does
it scan the whole document for both strings?
Rega
Updated the Todd script again...
Now there are page numbers added with the next and prev links.
http://www.mindbash.com/scripts/mygallery.zip
Hepp!
# Daniel Alsén| www.mindbash.com #
# [EMAIL PROTECTED] | +46 704 86 14 92 #
# ICQ: 63006462 | #
--
PHP General Mailing
> yours doen't need a text file with the image file names
> but this is usefull when you want to establish the order
> thumbs are shown
A matter of taste i guess. I wanted a script that needed as little work as
possible after i uploaded it.
Next thing to do is add page numbers for faster navigat
A little contribution from me as well...
I have altered the Todd Kennedy script a bit.
Instead of reading a textfile for the filenames it scans the directory and
displays all pictures (jpegs) that are there.
Go get it at: http://www.mindbash.com/scripts/mygallery.zip
# Daniel Alsén
Thanks guys!
--
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]
n"];
I get the day and month in numbers. But how do i join $date and $month and
put a / in between them in a new string?
Regards
# Daniel Alsén| www.mindbash.com #
# [EMAIL PROTECTED] | +46 704 86 14 92 #
# ICQ: 63006462 | #
--
PHP General Mailing List (htt
Still, if anyone wants to help out, or has a good solution, to make this
databasedriven - please e-mail me.
Regards
# Daniel Alsén| www.mindbash.com #
# [EMAIL PROTECTED] | +46 704 86 14 92 #
# ICQ: 63006462 | #
--
PHP General Mailing List (http://www.php.net/)
To unsu
-
> From: _lallous [mailto:[EMAIL PROTECTED]]
> Sent: den 18 september 2001 13:46
> To: [EMAIL PROTECTED]
> Subject: [PHP] Re: Replacing datafile with array
>
>
> works like a charm
>
> just initializet the $retVal function...
>
> $retVal = array();
> rest
Hmm...
it still doesn´t work.
If i echo $retVal i just get the word 'Array' (the same number of times that
the number of files in the directory).
If i echo $file i get the file listing...however, it doesn´t pass on the
content to the rest of my script.
Maybe someone could help me out with the
getting the word
'Array' at the start?
$handle=opendir('.');
while (false !== ($file = readdir($handle)))
if ($file != "." && $file != ".." && ereg(".jpg",$file)) {
$retVal[count($retVal)] =
quot;titel"], $myrow["dur"]);
} while ($myrow = mysql_fetch_array($result));
echo "\n";
} else {
echo "No records available...";
}
# Daniel Alsén| www.mindbash.com #
# [EMAIL PROTECTED] | +46 704 86 14 92 #
# ICQ: 63006462 | #
--
pictures. Nothing more fancy than that.
Alternatively - can anyone direct me to a good resource on coding these
types of scripts myself? Ie scanning folders, displaying content with
pagebreaks.
Regards
# Daniel Alsén| www.mindbash.com #
# [EMAIL PROTECTED] | +46 704 86 14 92 #
# ICQ
71 matches
Mail list logo