Hi,
what is the easiest way to check if a person i registered twice in a
mysql-table. Lets assume that I only check if the last name is in the table
more than once. This is in mysql 4.0 (subquery not an option).
Do I have to use arrays and in_array. Or is there a more elegant solution?
Best
I have a some problems doing a search and replace in a string.
I want to replace:
img ALT= src=base/image.php?id=3 border=0
with
img ALT= src=image.php?id=3 border=0
Note ALT, src, border properties may come in random order.
My solution today is a not good enough because I only do an
Hi,
I'm doing:
eregi($start(.*)end, $rf, $my_var);
And I want it to stop at the first presedence of $end, not the last (thats
what this is doing).
Any hints?
Best Regards
Fredrik A. Takle
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Hi,
I'm doing:
eregi($start(.*)end, $rf, $my_var);
And I want it to stop at the first presedence of $end, not the last (thats
what this is doing).
Any hints?
Best Regards
Fredrik A. Takle
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Wrap into a output buffer. ob_start, ob_get_contents
This was neat.
I did:
ob_start();
$myvar = ob_get_contents();
But it still outputs the page, can I disable that?
Regards
Fredrik
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Miguel Cruz [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
On Wed, 1 May 2002, Fredrik Arild Takle wrote:
Wrap into a output buffer. ob_start, ob_get_contents
This was neat.
I did:
ob_start();
$myvar = ob_get_contents();
But it still
Hi,
this might be a silly question, but I really haven't used XML alot with PHP.
I've parsed som XML, when I do xml_parse it outputs the html-codes.
I want to make a variable out of it.. I've tried $output = xml_parse();
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
Hi,
this might be a silly question, but I really haven't used XML alot with PHP.
I've parsed some XML, when I do xml_parse it outputs the html-codes.
I want to make a variable out of it, so I can write it to a file. I've tried
$output = xml_parse();
--
PHP General Mailing List
Why won't this work?
$NoteNm[$i] = eregi_replace (V:\memo\F0001\, , $NoteNm[$i]);
$NoteNm[$i] = eregi_replace (\\LOBBY\VismaDok\Memo\, ,
$NoteNm[$i]);
Best Regards
Fredrik A. Takle
Norway
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Backslashes are magic.
Double them and try again (e.g., ---
$NoteNm[$i] = eregi_replace (LOBBY\\VismaDok\\Memo\\, ...
Well I've allready tried that one:
Outputs:
Warning: REG_EESCAPE:~trailing backslash (\) in
D:\Inetpub\wwwroot\www_lobb\phpshop.php on line 28
Warning:
Hi,
I found a weekness in one of my local dev projects today.
php.ini is set ut with cookies off in session handling.
I asked another user to send me his url when logged in,
I copied and pasted it and then I was logged in as him.
What should I do? Turn cookies on? Or write ip to mysql? or...?
I have a win2k machine set-up with iis 5.0, php 4.1.0 and now I want to use
image_copy_resample()
image_copy_resample() is not working in the version of gd included in php
4.1.0.
Where should I download the .dll for version 2.0.1?
Regards
Fredrik A. Takle
--
PHP General Mailing List
I guess you have to set EVERYONE.
(Don't now for sure)
Fredrik A. Takle
Justin King [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
While trying to use dir() on a certain directory, I get the error
Warning: OpenDir: Invalid argument (errno 22) in
session_start();
$valid_session = true;
session_register(valid_session);
OR SOMETHING LIKE THIS?
if (session_is_registered($valid_session)) {
// Do something?!
}
Gaylen Fraley [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Why not populate a
Codewhiz is great.
Remember to download php-language-files if you want syntax-highlighted-code
(or something!)
Best Regards
Fredrik A. Takle
Kyle Smith [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Does it really exist? If so could someone post some URLs for
I think it's impossible to read/understand my own scripts if i don't do it.
Do:
?php
if ($submit) {
echo Counting from 1-32br;
for ($ii = '1'; $ii = '32' $ii++) {
echo $ii. ;
}
}
echo brAll done!;
?
instead of:
?php
if ($submit) {
echo Counting from 1-32br;
for ($ii =
You might wanna make a function for links:
?php
function makelink($descr, $href) {
global $printer;
if ($printer) {
$link = $descr ($href);
} else {
$link = a href=\$href\$descr/a;
}
return $link;
}
To echo an link in a site, do:
html above
?php
echo
$result = mysql_query(SELECT uname FROM users WHERE
uname=\'$username@$domain\');
$numrows = mysql_num_rows($result);
if ($numrows == '1') {
echo User already exists;
} else {
echo User don't exist;
}
Best Regards
Fredrik A. Takle
Bergen, Norway
Ker Ruben Ramos [EMAIL PROTECTED] wrote in
1. Authenticate user
2. Put the pictures in a secret folder or outside http_root
3. Do this:
?php
header(Content-Type: application/download\n);
header(Content-Disposition: filename=\$file\);
$fn = fopen($file , r);
fpassthru($fn);
?
I hope this helps!
Fredrik A. Takle
[EMAIL PROTECTED]
Is this a joke?
http://www.perl.com/search/index.php
*hehe*
--
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]
added the wrong script... arghh...
?php
Header(Content-type: image/gif);
$fp = @fopen($img,rb);
fpassthru($fp);
fclose($fp);
?
Fredrik Arild Takle [EMAIL PROTECTED] wrote in message
9gvl19$er6$[EMAIL PROTECTED]">news:9gvl19$er6$[EMAIL PROTECTED]...
1. Authenticate user
I'm trying to upload i file through a webpage...
-- add.php3
FORM method="post" action="do_add.php3"
input type="file" size=40 name="userfile"
INPUT type="submit" name="pub" value="Publiser"
/form
-- do_add.php3
copy($userfile, "/imgs/artikler/test.jpg");
unlink($userfile);
-- ERROR msg..:
1.
$date = "20010101";
How could I output 01 01 2001 (or make it 3 variables, like day, month, year)?
2.
What is the best way to encrypt (using PHP and MySQL)?
Could you please answer me directly by mailadr. ([EMAIL PROTECTED]), because I'm
currently not a member of this list at home!
23 matches
Mail list logo