Search the manual for "File Uploads"... there's an excellent code example,
plus user-cont notes, etc etc.
In other words, read the manual before asking :)
Justin French
on 25/08/02 5:27 AM, JohnP ([EMAIL PROTECTED]) wrote:
>
> Ok gang here is the problem - I need to allow the user to post
*sigh*
This gets asked EVERY DAY on the list.
1. search the archives before posting
2. PHP is server-side, so there's no way it can interact with the
client-side... try javascript
Justin French
on 25/08/02 4:38 PM, Alva Chew ([EMAIL PROTECTED]) wrote:
> Hi,
>
> Does anyone know how can i
try $REQUEST_URI
The URI which was given in order to access this page; for instance, '/index.html'.
Paul Roberts
http://www.paul-roberts.com
[EMAIL PROTECTED]
- Original Message -
From: <[EMAIL PROTECTED]>
To: "php-general" <[EMAIL PROTECTED]>
Sent: Friday, Augu
root@epona:/etc# apachectl start
Syntax error on line 14 of /etc/httpd.conf:
Cannot load /usr/lib/libphp4.so into server: /usr/lib/libphp4.so: undefined
symbol: alloc_globals
/usr/sbin/apachectl start: httpd could not be started
root@epona:/etc# head -n 14 /etc/httpd.conf | tail -n 1
LoadModule
On Sunday 25 August 2002 06:10 am, Casey Allen Shobe wrote:
> I would much rather be using Apache 2.0.40, however PHP would not build at
> all with --with-apxs2=/usr/sbin/apxs on another machine with Apache 2.0.40
> installed.
I was stupid in saying that without mentioning any further detail...he
hi i am trying to find a possible way to remove similar id keys and pass
back just each different one , for example i have a photo gallery each photo
has a userID key of who the photo was taken by i would like to grab all the
id for each photo and pass back just one result of the different people
sorry i found array_unique , so then how could i append the keys out of
mysql bak into one array ?
"Electroteque" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> hi i am trying to find a possible way to remove similar id keys and pass
> back just each different
Hello!
I wrote a little script for generation thumbnails of larger images
$origImage = imageCreateFromJpeg($sourcePath."/".$currentImageName);
$thumbnail = imageCreate($thumbWidth,$thumbHeight);// create empty image
imageCopyResized($thumbnail,$origImage,0,0,0,0,$thumbWidth,$thumbHeight,
never mind
SELECT DISTINCT u.user_name, u.email, p.userID FROM user u LEFT JOIN photos
p on p.userID=u.user_id WHERE p.galleryID='$galleryID'
heh
"Electroteque" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> hi i am trying to find a possible way to remove si
And do I need to use any other functions like mysql_fetch_row() ?
"Martín marqués" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> On Sáb 24 Ago 2002 11:19, Tony Harrison wrote:
> > How would I count the number of rows in a mysql table with a WHERE
clause?
>
> select count(*) fro
Hello,
I am sending variables via a link to another page eg. $provservdesc
If the variable provnum contains text such as: hello & there
Then only the word hello is passed on to agencydet.php.
I have tried using htmlspecialchars and htmlentities but still I have the same problem.
What I am tryi
> If the variable provnum contains text such as: hello & there
urlencode($provnum);
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
See the URL functions at http://www.php.net/manual/en/ref.url.php
IMHO, you'd need some encoding
Arcadius
"Ivan Carey" <[EMAIL PROTECTED]> wrote in message
006b01c24c2f$8d291950$0201a8c0@ivan">news:006b01c24c2f$8d291950$0201a8c0@ivan...
Hello,
I am sending variables via a link to another p
Hi!
I would like to ask you guys again, who have problems with the
current CHM edition to help us make all them go away. We already
corrected the example display problem, but some guys reported
bugs about the context menu positioning and the page display
process also has some bugs in IE6.
The bu
>>> On Sáb 24 Ago 2002 11:19, Tony Harrison wrote:
>>> How would I count the number of rows in a mysql table with a WHERE
>>> clause?
> >
>> "Martín marqués" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]...
> > select count(*) from table_name WHERE .
> >
>From: "Tony Harriso
> $sql = "select count(*) from table_name WHERE .";
> $result = mysql_query($sql) or die(mysql_error);
> $row = mysql_fetch_row($result);
> $rowCount=$row[0];
or
$sql = "select count(*) from table_name WHERE .";
$result = mysql_query($sql) or die(mysql_error);
$rowCount=mysql_result($resu
On Sunday 25 August 2002 05:53, Brian & Shannon Windsor wrote:
> I'm trying to upload files from my PC to my website. The code is a little
> nuts, but it's all I got to work locally, butonce I take the code to the
> web I get this message. Can anyone tell me what I'm doing wrong?
>
> I'm trying
or, you should be able to simply do this, without the cost of fetching
the results:
$result = mysql_query("SELECT count(*) FROM table WHERE");
$num_rows = mysql_num_rows($result);
echo "$num_rows Rows\n";
>> $sql = "select count(*) from table_name WHERE .";
>> $result = mysql_query($sql) o
On Saturday 24 August 2002 16:52, Andy wrote:
> I do have a command line php version installed and I need to switch
> register globals to on for this install. Where do I find this php.ini
> regarding this installation. There is also a web-php installation running
> where I do have a php.ini for.
Randy,
Try using a View, or a Temp Table in your database.
This keeps the data "available" in a specified form.
Best regards,
Andrew Hill
OpenLink Software
On Sunday, August 25, 2002, at 12:23 AM, Randy Johnson wrote:
> Hello,
>
> Is it possible to select data from a database and have it be av
On Sunday 25 August 2002 22:07, salamander wrote:
> or, you should be able to simply do this, without the cost of fetching
> the results:
>
> $result = mysql_query("SELECT count(*) FROM table WHERE");
> $num_rows = mysql_num_rows($result);
> echo "$num_rows Rows\n";
No. This only returns 1 row re
Hi,
This is the first time I've REALLY tackled multi-dimensional arrays, in
conjunctions with functions.
I like the way this code works:
So I built a function which returns a multi-dimensional array:
$v)
{ $$k = $v; }
$songs["$id"] = array(
its not a gd 2 issue , i cant even get gd2 to compile with php 4.2.2, no
idea why i've installed gd2 fine
imageJpeg($thumbnail, $targetPath."/".$thumbNamePrefix."_thumb.jpg",100);
that'll give it a quality of 100 , even still i notice its pretty bad , i
need to use the bicubicresampled gd2 funct
Everytime you call the function, it re-runs the sql, and gives you the same
list. The only time it wouldn't do that was if the id wasn't found. You
could probably change the function to a class, where the constuctor ran the
sql, and then you had another method to get the next entry.
- Origi
Fongming schrieb:
> Hi:
>
> the following is my easy way to send MIME mail with a
> attach files. It worked for my own mailing system.
>
> //---Make sure if a file upload or not...
>
> if(!empty($my_file))
> {
>
> copy($my_file,"files/$my_file_name");
> $fp=fopen("files/$my_file_name","r"
On Mon, 26 Aug 2002 01:12:56 +1000, you wrote:
>However, I was hoping to use it in a similar way that I use mysql in the
>above code... something like:
>while($song = getSongByArtist(4))
>{
>echo song['title'];
>echo song['writers'];
>echo song['video'];
>echo song['artist_id'
php-general Digest 25 Aug 2002 15:45:34 - Issue 1546
Topics (messages 114024 through 114058):
Dynamically Downloading Data
114024 by: Randy Johnson
114052 by: salamander
Re: Base64 and MS Word cutting and pasting.
114025 by: Manuel Lemos
Re: Recent discovered mail
On Sun, 25 Aug 2002 10:49:00 -0500, you wrote:
>static $myrow;
>if($myrow = mysql_fetch_array($result)) {
[...]
Oops. We want to remember the position of the result set, so it's
$result that should be static, not $myrow. In addition, you'll have
to put a check at the top of the function to see
I've isolated the problem with MS Word and MS Wordpad; The problem does not
occur when pasting from Notepad. I want to make sure that all the text is
ASCII before converting to MIME encoding. This shoul alleviate the problems
that are occuring.
Thanks,
/dkm
- Original Message -
From: "
Just wanna test this list.
Thanks for all your help :)
Justin
on 26/08/02 1:55 AM, Michael Sims ([EMAIL PROTECTED]) wrote:
> On Sun, 25 Aug 2002 10:49:00 -0500, you wrote:
>
>> static $myrow;
>> if($myrow = mysql_fetch_array($result)) {
> [...]
>
> Oops. We want to remember the position of the result set, so it's
> $r
Hi,
I'm working on a site where I'm using geeklog
http://geeklog.sourceforge.net/
It has the requirement that
> "Geeklog needs the register_globals variable turned on in order to work.
> Since PHP 4.2.0, the default for register_globals is "off". To fix it,
> simply add the following line to
> I'm working on a site where I'm using geeklog
> http://geeklog.sourceforge.net/
>
> It has the requirement that
>
> > "Geeklog needs the register_globals variable turned on in order to work.
> > Since PHP 4.2.0, the default for register_globals is "off". To fix it,
> > simply add the following l
imageCreate will create an image, but its palette will be very limited, so
when you try to copy your photo onto it, it will maintain the palette of the
original picture. Obviously, this is not what you want, since the picture
comes out looking all grey and faded (probably 8-16 colors!).
What wo
If I insert a row's field's value using the PASSWORD() function, will I need
to use it or another function to find that row using the same field?
-
[EMAIL PROTECTED]
http://www.cool-palace.com
--
PHP General Mailing List (http://www.php.net/)
To uns
I've got the following bit of code for an upload/feedback form.. Upload isn't a
required field, but name, email and message are.. When someone submits this form
with an upload used, it works fine.. But if an upload is excluded and they only
fill in the required fields, I don't get an email..
I'm
You need to give us the HTML for the form so we can comprehend the context
of it all
"Eriol" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I've got the following bit of code for an upload/feedback form.. Upload
isn't a
> required field, but name, email and me
Sorry, I didn't figure it was needed, but here is the html info as requested..
Thanks..
Name:
Email:
" class="file"/>
Upload: [ Information ]
If you have GD2 I'd advise using imagecopyresampled, as I found using
imagecopyresized often resulted in blue or grayish images, while
imagecopyresampled resulted in normal looking images.
Jason Reid
[EMAIL PROTECTED]
--
AC Host Canada
www.achost.ca
- Original Message -
From: "Dave at Si
okay, so then a "select *" and then a num_rows ...
On Sunday, August 25, 2002, at 10:11 AM, Jason Wong wrote:
> On Sunday 25 August 2002 22:07, salamander wrote:
>> or, you should be able to simply do this, without the cost of fetching
>> the results:
>>
>> $result = mysql_query("SELECT count(*)
I think you were on the right track with your first response. Selecting
a count(*) gives you the number of rows returned without the overhead of
actually returning all of the rows to PHP. Most people will rename the
count as something more easy to reference (and/or more descriptive) in
the res
This should be very simple but it isn't working.
upload.html has this:
and
upload2.php has this:
Where is the file??
Thanks
__
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com
--
PHP General Mailing
Check these out:
http://www.php.net/manual/en/features.file-upload.php
http://www.php.net/manual/en/function.move-uploaded-file.php
>From the bit of code you posted, you're not declaring where an upload should
actually go.. If you want it sent via email (attachment, not upload), that's
another s
I got this figured out already.. I was having a brain fart and just needed to
move the IF statement with the mail() function further down past a few ELSE
statements.. Thanks anyway..
Take care.. peace..
eriol
"Eriol" <[EMAIL PROTECTED]> disgorged:
: I've got the following bit of code for
Daniel Guerrier wrote:
>echo($_POST['userfile]);
>
Do you mean $_POST["userfile"] here? It looks like you're missing a quote.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Thanks
the quote wasn't the issue.
Actually I shold have use $_FILE not $_POST .
--- Chris Shiflett <[EMAIL PROTECTED]> wrote:
> Daniel Guerrier wrote:
>
> >echo($_POST['userfile]);
> >
>
> Do you mean $_POST["userfile"] here? It looks like
> you're missing a quote.
>
>
> --
> PHP General M
Hi guys,
Am writing a web based mailclient (obviously with PHP+IMAP),
In the 'ReplyMail' script, inorder to add the "> " string
at the beginning of everyline, I used the following code,
",
htmlspecialchars(trim(imap_body($mbox, $msg;
?>
This is giving an output with one additional \n in th
Ok after being blasted for not looking on PHP.net first I have now returned none the
wiser! :D
Here is the post file:
-
Send this file:
Here is the post handler file:
And here is the error I get:
-
> And here is the error I get:
> -
> Warning: Unable to create
> '/home/thehobby/public_html/php/phpforums/uploads/': Is a
Does this directory exist? Does the user that your web server is
running as have permission to write files in this directory?
>
I have two list one is listA and the other is listB I would
like to take the values in listB and compare them with listA if any of
them match then I what to create a new list listC and put the values
that match in it. If they do not match I want the values to go into listD.
I have been messing wi
array_intersect() will give you listC directly. Just feed it list A and
B. Then you can take a copy of listA and do a foreach on the array_keys()
of listC and unset() them. Now this copy with the removed elements
becomes your listD
-Rasmus
On Sun, 25 Aug 2002 [EMAIL PROTECTED] wrote:
>
> I h
imagecopyresize() just skips pixels in order to reduce it in size.
imagecopyresampled() will take the average of adjacent pixels and
therefore produce a much better scaled down image.
-Rasmus
On Sun, 25 Aug 2002, Jason Reid wrote:
> If you have GD2 I'd advise using imagecopyresampled, as I foun
Does anyone know if there is a native function within PHP to convert numbers
to roman numerals?
I could easily write a little convertor, but I was hoping there was an
simple function - although I couldn't seem to find anything like that in the
manual.
Dave
--
PHP General Mailing List (http://
Hello Rasmus,
Ok I understand the array_intersect and have gotten that to work.
I just don't understand the second part using the foreach and unset().
this is what I have it gives me three separate list
$listA="tester1 tester2 tester3 tester4 tester5 tester6 tester7 tester8 tester9";
$listB="te
$lista=array(1,2,3,4,5,6,7,8,9);
$listb=array(4,6,8);
$listc=array_intersect($lista,$listb);
$listd=array_diff($lista,$listb);
Op maandag 26 augustus 2002 01:48, schreef Rasmus Lerdorf:
> array_intersect() will give you listC directly. Just feed it list A and
> B. Then you can take a copy of l
I think you have to specify the destination file name as well. The
destination directory is not enough.
---
Seairth Jacobs
[EMAIL PROTECTED]
"Johnp" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Ok after being blasted for not looking on PHP.net first I have
Hey all,
I need to restart apache using PHP. Is this possible?
Or, ar least apply a modified config file...
PHP is running as nobody:nobody as is Apache.
Thanks,
Liam
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> Send this file:
>
>
I am not really replying to your question, but just as a remark, in php, a
variable needs to start with a letter or and underscire. (must be detailed
in the doc)
So I have absolutely no idea how PHP will interpret this line :
(and I would be curious to know how it
Hi !
there is no way to apply a config file to apache without restarting the
webserver
the only way I know (which really does not mean that it is the only one !),
is to use the command "apachctl" or "httpd". But those command need to be
launched as root, I think (try to login as root, then to
using register_globals=on and trying to echo out the $5400 errors as
expected, but php sees the correct entry in the $_GET superglobal array as
it should. running a simple foreach($_GET as $key => $val) returns a key of
5400 and a value of 1000 on a page with the querystring of
page.php?5400=1000,
Yes, you can make Apache reload a config file without restarting. You
must send it a SIGHUP:
kill -HUP `cat /var/run/httpd.pid`
If you execute this as nobody, I believe it will work, but I haven't
tested it.
Also, I believe Apache will restart when given a "kill -1". If the above
suggestions
Help!
I am getting the following error message for :
Fatal error: Call to undefined function: mysql_connect() in
/home/www/test.somename.org/aux/db-mod.php on line 34
I have used this call successfully on php v4.0.6, and am now trying it on a new
install (which someone else did, as I haven't
I am showing a directory of files and I don't what all the files to
show on the screen. I was able to get the . and the .. not to show
with what I have below but there are some other files in there that look
like this mylist.confg. I don't want them to show in the directory
list. I tried && $files
There are several regular expression and string matching functions you could
use.
http://www.php.net/manual/en/ref.strings.php
http://www.php.net/manual/en/ref.pcre.php
http://www.php.net/manual/en/ref.regex.php
Justin Garrett
<[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL
>
>Help!
>
>I am getting the following error message for :
> $link=mysql_connect("localhost","$user","$pass"); // line 34
>?>
>
>Fatal error: Call to undefined function: mysql_connect() in
/home/www/test.somename.org/aux/db-mod.php on line 34
>
>I have used this call successfully on php v4.0.6,
php-general Digest 26 Aug 2002 03:54:38 - Issue 1547
Topics (messages 114059 through 114096):
Re: trouble with function
114059 by: Michael Sims
114062 by: Justin French
Re: Base64 and MS Word cutting and pasting.
114060 by: Dennis Moore
test ;)
114061 by: V
Just curious... Have you tried it with POSTed variables? As in the case
mentioned?
Just wondering... Anyway, I'll try it myself later...
- E
>
>using register_globals=on and trying to echo out the $5400 errors as
>expected, but php sees the correct entry in the $_GET superglobal array as
>it sh
I see. It seems like, asking the users to copy from Word to Notepad then to
the textarea is not really an option so I guess you really need to find a
way how to fix it.
How about Manuel Lemos' advice posted earlier?
BTW, I was just wondering if you've also considered that the problem might
be
Thanks Edwin, I'll forward your notes to my new host. I also checked the
archives and find that there's an extension=mysql.so snip that needs to go
in the php.ini file, and I'll forward this to my host too.
Thanks,
Hugh
- Original Message -
From: "@ Edwin" <[EMAIL PROTECTED]>
To: <[EMAIL P
do a php_info() on a page and check the mysql propeties in there.. might
give you a clue..
> -Original Message-
> From: hugh danaher [mailto:[EMAIL PROTECTED]]
> Sent: Monday, 26 August 2002 1:18 PM
> To: php
> Subject: [PHP] Call to undefined function mysql_connect()
>
>
> Help!
>
> I a
Ok I have a script done but it does not work - If there is no info in the db row I
need the script to detect that and enter a number - the problem I am having is that if
the row is empty it will return nothing - is there a function or something else that
you can use to return true if a db row i
Forgot to add one thing - I don't need to add the new number after detection
to the db but rather just print it out
"Johnp" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Ok I have a script done but it does not work - If there is no info in the db
row I need th
On Fri, Aug 23, 2002 at 11:52:11AM -0500, Curtis Robinson wrote:
> So, I see that php does not have the CA. But, I have no clue as to where
> to define the location of the CA in the php configuration. So, does
> anyone know how I can configure this option?
Are you using OpenLDAP? The below is o
Hi,
there is a newsletter or massmailer(open source), created with php, with option for
sending mail with attashments to groups of clients?
I tried phpmailer,DeepThroat,MyMail but atashments are not permitted, or only html and
text.
Any other sources?
tx in advance for any help
adi
Hello,
On 08/26/2002 03:49 AM, Adi wrote:
> Hi,
> there is a newsletter or massmailer(open source), created with php, with option for
>sending mail with attashments to groups of clients?
> I tried phpmailer,DeepThroat,MyMail but atashments are not permitted, or only html
>and text.
> Any other
75 matches
Mail list logo