Check this out...
http://us2.php.net/manual/en/function.substr.php
- Original Message -
From: Ahmed Abdel-Aliem <[EMAIL PROTECTED]>
Date: Monday, December 20, 2004 12:59 pm
Subject: [PHP] first letter
> hi
> if i have for example this variable
>
> $name = "John";
>
> how can i echo the
You need a way to make new table rows...
if you want to do it ever other image, then just add a counter variable,
incrememnt it each time and if it is even then make a new table row.
(Also if the images are two big, the browser may put them on a new line, so you
might have to look into shrinkin
- Original Message -
From: Stuart Felenstein <[EMAIL PROTECTED]>
Date: Thursday, November 11, 2004 7:13 am
Subject: Re: [PHP] Looking for pointers to mysql functions
>
> --- [EMAIL PROTECTED] wrote:
>
> > This would be handled in your query, so get a SQL
> > book or look into the mysq
This would be handled in your query, so get a SQL book or look into the mysql
documentation...
Look at the select statement, to request specific fields, as well as the Limit
keyword to return a certain number of results per page.
-B
- Original Message -
From: Stuart Felenstein <[EMAIL
Pass your session along with your form action...
i.e
$s = SID;
echo "
- Original Message -
From: Sam Smith <[EMAIL PROTECTED]>
Date: Tuesday, November 9, 2004 1:12 pm
Subject: [PHP] POST losing SESSION vars?
>
> I have a page that will be redirected to a login page if the
> SESSI
Echo out your queries!
$query = "insert into joke values('',".$_POST['joke_text'].",'date')";
---> echo $query;
$result= mysql_query($query);
This will tell you what is going on, perhaps some of the information is not set? You
can even copy and paste the output to run against your mysql backend
To prevent the blocking and your CPU going up to 100% usages look into:
http://us2.php.net/manual/en/function.socket-select.php
For length of a string:
http://us2.php.net/manual/en/function.strlen.php
- Original Message -
From: René Fournier <[EMAIL PROTECTED]>
Date: Thursday, October 28
Set your server to GMT.
- Original Message -
From: Ben Miller <[EMAIL PROTECTED]>
Date: Thursday, October 21, 2004 10:48 am
Subject: [PHP] Simple Time Question
> Probably a stupid question, but hopefully has a simple answer. Is
> there a
> way to get Grenwich Mean time? time() and date
http://www.google.com/search?hl=en&q=Windows+directories+writable
- Original Message -
From: Jonathan Haddad <[EMAIL PROTECTED]>
Date: Wednesday, October 20, 2004 12:59 pm
Subject: [PHP] PHP on Windows
> So I'm setting up a website that needs to run on a windows server.
>
> There are fi
It can't find your mysql stuff to link in.
What does your configuration command look like?
you might have to specify the path to mysql, i.e. --with-mysql=/path/to/mysql
-Brad
- Original Message -
From: "Mulley, Nikhil" <[EMAIL PROTECTED]>
Date: Tuesday, October 19, 2004 7:18 am
Subject: [
for ($i=0; $i
Date: Monday, October 18, 2004 2:33 pm
Subject: Re: [PHP] setting index of array as 1
> It's not what I was looking for. Looks like I didn't explain very
> well :)
>
> look at this case:
>
> $query = mysql_query("select name from names order by date desc");
> while($result = mysql
$new_array[1] = 'something';
- or -
$new_array = array(1=>'something');
- Original Message -
From: Afan Pasalic <[EMAIL PROTECTED]>
Date: Monday, October 18, 2004 1:14 pm
Subject: [PHP] setting index of array as 1
> when create an array using:
> $new_array[] = 'something';
> first index o
http://us2.php.net/manual/en/function.number-format.php
- Original Message -
From: Nunners <[EMAIL PROTECTED]>
Date: Monday, October 18, 2004 7:03 am
Subject: [PHP] Floating values
> Simple question.
>
>
>
> I'm writing an accounting package, and have setup the MySQL
> database with
Yes,
write a script with:
and you will find all the wonderous variables at your disposal...
-B
- Original Message -
From: Ben <[EMAIL PROTECTED]>
Date: Thursday, October 14, 2004 3:37 pm
Subject: [PHP] Referring Page
> I am trying to set up a script that will do different things based
Start here...
http://us2.php.net/manual/en/language.types.php
- Original Message -
From: Juan Pablo Herrera <[EMAIL PROTECTED]>
Date: Thursday, October 14, 2004 1:19 pm
Subject: [PHP] intenger
> Please, i need output a intenger, what function can i use for this?.
> Print?, echo?
>
> Than
Create some format to store the info for the form contents...
like off the top of my head...
TEXT:Name:20:RADIO:Sex:Option1:Option2:CHECKBOX:State:Option1:Option2:...:PASSWORD:Password:20:
Just an example, but doable to store in a database, then you create parsing functions
to handle this str
- Original Message -
From: "Jed R. Brubaker" <[EMAIL PROTECTED]>
Date: Wednesday, October 13, 2004 1:21 pm
Subject: Re: [PHP] mail problems - phpinfo information
> So as I am not an administrator, and all I have to go on is
> phpinfo (unless
> anyone has some suggestions), should I be
if (isset($_POST['submit]))
(missing close apostrophe here...)
if (isset($_POST['submit']))
- not sure if this is THE problem, but A problem for sure.
-Brad
- Original Message -
From: [EMAIL PROTECTED]
Date: Tuesday, September 21, 2004 8:36 am
Subject: [PHP] unexpected $ error
> hi,
>
>
Hello All,
I've had this problem for a little while now.
I am building PHP as an Apache shared Module, so my configure looks something like
this:
./configure --with-mysql=.. --with-pgsql=.. --with-gd --with-apxs=..
This works fine, builds fine, but when I run make install, it freezes.
HOST php
The tip..
copy and paste your error code into google ;-)
Do it for all errors, you'll be amazed @ how many have already been answered
- Original Message -
From: "Eric L. Sammons" <[EMAIL PROTECTED]>
Date: Thursday, August 12, 2004 2:44 pm
Subject: [PHP] Fatal error: Call to undefined
I'm sure there are many ways to do this.
Perhaps use something like this as a query?
select * from login_table order by DATE_LAST_LOGGED_IN ASC limit 1
- Original Message -
From: Harlequin <[EMAIL PROTECTED]>
Date: Monday, July 26, 2004 1:27 pm
Subject: [PHP] Retrieve The Last Record in
I think all sockets less then 1024 need superuser permission to bind. And because
Apache typically runs as nobody you don't have permission, so either run apache as
root (DANGER!) or choose a socket above 1024.
-Brad
- Original Message -
From: Josh Close <[EMAIL PROTECTED]>
Date: Frida
Try:
if ($_SERVER['REQUEST_METHOD'] == 'POST')
and then read:
http://us4.php.net/reserved.variables
-Brad
- Original Message -
From: Amanda Hemmerich <[EMAIL PROTECTED]>
Date: Wednesday, June 23, 2004 12:13 pm
Subject: [PHP] bad programming?
> We just moved a bunch of code from one web
I guess I should have put this in one post
Your subject says something different then your question, one asking for the computer
name, the other the MAC. To get the MAC the computer will need to be on your LAN,
otherwise this is not possible. You can then use the 'arp' command to get the MA
If you have the IP address, then 'nslookup'
or I guess now 'dig' and 'host' would be the newere versions. They are Linux system
calls, use system() or exec() to use them within your script, and play around with the
options and/or read the man pages for how to use them.
HTH
-Brad
- Origina
Well,
Start here to read about how to upload files to a web server..
http://us2.php.net/features.file-upload
And then as for displaying them, look into some standard HTML to display the
text links, and possibly this solutions for readin directory contents:
http://us2.php.net/manual/en/ref.dir.php
This is really a formatting issue, not type casting, so loook in those areas of
the manual. Perhaps start around:
http://us2.php.net/manual/en/function.printf.php
-Brad
> $amount is a calculated number
>
> If $amount equals for example 52., how do I get that to print as "52.00"
> similarly, i
http://www.mysql.com/doc/en/ALTER_TABLE.html
> I know this is more of a mySQL question but, how do I delete and add rows
> and columns?
>
> --
>
> - Zavaboy
> [EMAIL PROTECTED]
> www.zavaboy.com
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www
Run 'ipconfig' from a command prompt to get your IP address.
(or as mentioned, localhost will work)
-Brad
> Hi all,
>
> I know this is not the right group to this but I am desperate. I have just
> got Apache and I am a total newbie to Apache and to playing with servers, so
> as u can imagine I am
Well, make sure you tunnel it securly with SSL or the like, but have a look at:
http://us3.php.net/manual/en/function.crypt.php
-Brad
> Hi,
>
> is there a way, to verify a password via php, if it matches it's entry
> in /etc/shadow ?
> I am trying to write a script, which needs a user authentif
Hello,
I did a family photo gallery, and from my experiences it would be best if you
handle the thumbnail generation during the upload process. Just make sure you
have a naming convention or link the thumnail into your repository/DB so you
don't loose that space when you delete the record. It
Sorry to all who think this horse is sufficiently beat, but just to throw
another couple of cents into the pot...
I think this list is a product of its own behavior. Some people do get mad
because of "dumb" or simple questions. We breed those questions though because
instead of people explain
I would say the dynamic nature of this guide requires it to be online, unless
you want to make some sort of "update" feature. Otherwise you would only be
downloading a snapshot. And then comes into play creating and maintaing all
the various "snapshots" of this ever changing document. IMHO, I
Answer to number 1:
I'm sure you could, but why would you want to when Javascript is more suited
for this type of processing. If you don't know javascript google for some
tutorials or for alert boxes, and I'm sure you will find plenty of examples.
for #2:
For Mysql check this:
http://www.mysql
Sure, in JAVA.
> Hi!
>
> Is it possible to create a chat screen that updates screen in some kind
> of loop from the database?
>
> So if someone sends a message to database it immediately shows on chat
> screen?
>
> Kind regards,
> Sami
>
>
> --
> PHP General Mailing List (http://www.php.ne
Check the archives about global variables in the php.ini file
> Hello,
>
> I am having issues after I upgraded from 4.0.5 to 4.3
>
> Alot of my link pages were based in
> www.something.com/phptest.php?foo=9323
>
> Now that I have upgraded, I get foo errors.
>
> It says that it no longer gets t
Like a previous poster said, you would have to develop some type of plug-in to
work with the browsers that would incorporate PHP on the client side. Or talk
Microsoft into including it in Internet Exploder by default :-) This strategy
depends on user experience studies..I know many people who
"One language across the whole web"
In a word: JAVA
Has the cross-platform flexability of PHP with a little more versitility and
power under the hood. Of course PHP still has its niche, but I'm still waiting
to go to an ecommerce page that fires up and interactive store applet on the
client si
You need to escape the '/' with a '/', as it is a special character.
So, anytime you run into an issue where it looks like PHP is trying to
interpret something you just want it to print. The best first guess is to
try and escape it.
Just Thought I would offer a little more explaination.
> --
> Hi,
>
> I'm planning to build a web album for my digital photographs, and have
> some questions regarding the design:
>
> 1) Is it better to store the images within the database, or just store
> pointers to the images which is put outside, in the filesystem?
>
IMHO, store a link of "poin
Can you get into the mysql DB via command line? If so, try to get in there and
make sure this user has permissions in the mysql.users table to connect via
localhost. Also verufy password they are using. Try to have this user connect
via the commandline in MYSQL, which if he is unable to there
the '@' sign suppresses the error/warning messages. Perhaps you would want to
leave that off in a development environment. It may lead to some good keys to
finding the solution..
-Brad
> mySQL; php running in safe mode; compared to the other code on the same
> server. here is mine - I don't ge
Quality HTML/embedded with PHP? (Same way any reports are printed from the web)
-or- Perhaps, check out PDFLib.
-Brad
> Hi everybody:
>
> Over linux, I'm using PostgreSQL , Apache server, and PHP pages to
create> a
> database systems with web interface.
>
> I need to know how programmers have
Mark,
Try looking at :
http://www.php.net/manual/en/function.mysql-data-seek.php
and see if that function gives you the desired result.
HTH
-Brad
> I was wondering if there is a easy way to loop through the same SQL results
> many times.
> I have a for loop that loops 3 time. Each time I want to
Hello...
I gotten a few of these, was wondering if this account is going to be axed from
the distrbution list, hopefully soon.
This is an automatically generated Delivery Status Notification.
Delivery to the following recipients failed.
[EMAIL PROTECTED]
Thanks
-Brad
--
PHP Genera
look at the alter table syntax on the mysql Documentation page.
-Brad
> Hi,
>
> please could someone tell me what the sql command is to add a colummn to a
> table?
>
> Thanks for your help
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.
Wow, PHP Version 2, that's OLD school.
If you mean 4.2.3, check out the archives for the list. I believe there has
been discussion on the issue and it seems like Apache 2.0.x is really still in
development at this point so it is a "use at your own risk", but they whouls
work, just might not be
I think there is a PHP release mailing list, that should keep you in the loop,
or check php.net. The news is usually fresh there.
-Brad
> When will there be a new release of php?
>
> With kind regards,
>
> Richard Pijnenburg
> Klik-on Internet Solutions
>
>
--
PHP General Mailing L
h...
I *think* PHP is platform independant for the most part, and it is not like it
is a compiled language where you have fancy debuggers to set breakpoints, step
through the code, etc...
Why not use the functions built into PHP?
echo " ";
if a mysql problem: mysql_error()
-Brad
> Hi all,
What Version :-)
Check the manual, it has an interesting note:
Note: Since PHP 4.2.0 it's no longer necessary to seed the random number
generator before using it.
HTH
-Brad
> Let's say you have a simple PHP file that just displays a random number.
> When the user hits the submit button, the
Have you by chance read any documents or tutorials? I know there are many
helpful ones at places like phpbuilder.com, and many others.
This list is more helpful when you have a specific question to be answered,
this is too open ended.
-Brad
> Hello,
>
> I am making a page where people c
Is there a changelog for this, so we know what to test?
-Brad
> Hello,
>
> PHP 4.3.0pre1 is available for download from http://qa.php.net. PHP
> 4.3.0 incorporates a very large number of changes, new features, and
> bugfixes, and thus requires extensive testing. This preliminary release
> is mea
http://www.php.net/manual/en/function.fsockopen.php
Seems to be A LOT of useful information there? Did you check it out?
-Brad
> I have a script that downloads html pages from many different sites. The
> script executes as expected but is slw. I would like to replace
> fopen() with fs
Maybe you should assign the query to is's own value doing your string
concatenation...
i.e.
$query = "select * ...";
then echo out the query:
echo $query;
I think you will see the problem them, I would guess that when you are adding
the table_prefix to the table name that you are getting an e
If you read:
http://www.php.net/manual/en/function.mysql-query.php
You will see what $sql4 can be.
My guess would be he is connected to 2 or more different databases, and this is
specifiying which one to execute the query on.
-Brad
> [snip]
> if ($update_type == update_Williams) {
> mysql_query
Someone already posted a solution, which was a great idea actually :-)
exec("arp $_SERVER[REMOTE_ADDR]", $output);
echo "H/W Addr should be: $output[1]";
Because you are on a LAN, you should be easily able to acertain the MAC address
through ARP. This would not qork for non-LAN situations, but
Question 1:
I think this has to do with how you attribute your file extensions in
httpd.conf (Apache thing, not PHP), so check out the docs on apache.org
Question 2:
I woudl tend to believe it depends what kind of link it is...
is it and HTTP downlaod site (which would use the windows "save file
What I found works very well for this is the function:
getimagesize();
$image_file = "something.jpg";
$size = getimagesize($image_file);
//$size[0] = height and $size[1] = width (double check on php.net)
//Then just divide them...
$width = $size[1]/2;
$height=$size[0]/2;
This way it will keep
Just and FYI update, in case someone else has this problem...
The problem was the example was using $PHP_SELF as the form action variable,
of course it has been discussed on this list that in the newer versions
of PHP, register_globals is turned off in php.ini, so $PHP_SELF had no real
meaning,
If the variable is within a form you could do:
This would pass to the next page, otherwise the ?name_of_var=$err_code mau be
the way to go?
-Brad
> hi there i am trying to pass error code vars within a page say i post to a
> query string like ?action=upload i would like to be able to send an
60 matches
Mail list logo