Look up htmlentities() in the php manual and see if it'll work for you.
Hugh
- Original Message -
From: Merlin [EMAIL PROTECTED]
To: php-general@lists.php.net
Sent: Thursday, March 30, 2006 1:28 AM
Subject: [PHP] Outputting text ? how to?
Hi there,
I would like to output following
If you want to preserve the blank spaces then try;
str_replace( , nbsp;, $contents); // nbsp; is html for blank space.
HTH
HTD
- Original Message -
From: [EMAIL PROTECTED]
To: php-general@lists.php.net
Sent: Wednesday, February 15, 2006 10:26 PM
Subject: [PHP] please help me I try to
] please help me I try to post my question to Php.net
2-3times
Hugh Danaher wrote:
If you want to preserve the blank spaces then try;
str_replace( , nbsp;, $contents); // nbsp; is html for blank space.
HTH
HTD
no he don't:
qote:
read text file to array string
--
Smileys rule (cX.x)C --o(^_^o
Suresh,
You could use the link to pass your variable to the next page, or to the
same page:
Instead of
$count=0;
use
if (!isset($_GET['count'])) $count=0;
Then for your link use
print a href=http://www.whatever.com?count=$countlink to new
page/a
or use
print a
Philip,
You'll often get an error call on a line when there is a problem on the
previous line. Say, you forgot to end a line with a semicolon, then it will
error the next line.
Hugh
- Original Message -
From: Philip W. [EMAIL PROTECTED]
To: php-general@lists.php.net
Sent: Saturday,
Use php's ftp commands.
Hugh
- Original Message -
From: Dave [EMAIL PROTECTED]
To: php-general@lists.php.net
Sent: Saturday, January 29, 2005 11:11 AM
Subject: [PHP] Permissions on uploaded image don't allow for over writing
PHP List,
The Situation:
I am building a content
Ross,
Try something like this in your form:
textarea name=description rows=4 cols=40$description/textarea
You can then edit the contents of the cell
Hope this helps.
Hugh
- Original Message -
From: Ross Hulford [EMAIL PROTECTED]
To: php-general@lists.php.net
Sent: Tuesday, January 18,
Chris,
I've done something like this to update website's static pages. Basically,
in a php script I've replaced all of the print statements with $line.=
statements to accumulate all the items you want printed into one long
string. I've then ftp'ed this string, along with the name of the html
Bruno,
This often occurs when there is no closing bracket } for a conditional
statement or a loop.
hth
Hugh
- Original Message -
From: Bruno Mattarollo [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, February 11, 2004 2:51 AM
Subject: Re: [PHP] parse error, unexpected $
Parse
Chris,
It looks like your data in date_year is not in a format that supports a
simple DESC sort. Look into getting the column formatted in -mm-dd
order (see the mysql manual for this). Read the data in your column, format
it, pump it back into the database, then change the column type to
Gloria,
Glad to help, but I'd need to see the code that failing.
Hugh
- Original Message -
From: Gloria L. McMillan [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, June 06, 2003 4:53 PM
Subject: [PHP] Problem Display of data
Hi, again.
I got one suggestion but it did not work
Matt,
Try something like:
?
$fp=fopen(file_name.txt,r);
while (feof($fp))
{
$line=fget($fp,100); // grabs text to end of line or 100 characters
whichever comes first
if (!preg_match(/delete/,$line))
{
$new_line.=$line;
}
}
fclose($fp);
$fp=fopen(file_name.txt,w);
fwrite($fp,$new_line)
My bad:
while (!feof($fp))
instead of what I wrote earlier.
- Original Message -
From: Hugh Danaher [EMAIL PROTECTED]
To: Matt Palermo [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, June 05, 2003 10:59 PM
Subject: Re: [PHP] delete lines from text file
Matt,
Try something like
try something simpler and see if it passes:
$SelectQuery=SELECT SUM(GiftSubscriptions) AS GiftSubs FROM Registration;
$Result = mysql_query($SelectQuery) or die(Something died in here!
.mysql_error());
- Original Message -
From: Kurosh Burris [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent:
Levi,
Very easy to do exactly what you want using php
1. write your link to a php page (described below) which includes the items
you want stored appended to the link a
href=page.php?var1=somethingvar2=something_elsego to next page/a
2. create a php page which contains the following:
?php
Scott,
try changing:
print \t\ttd$col_value/td\n;
to:
print \t\ttda href=mailto:.$col_value.;$col_value/a/td\n;
Hope this helps.
Hugh
- Original Message -
From: Scott Thompson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, March 29, 2003 8:53 PM
Subject: [PHP] Adding a URL
Sounds like a Windows configuration issue and not a php issue. There's an
'open using' (or some such) option buried in the windows file menu that will
let you change this.
Hugh
- Original Message -
From: Anthony Ritter [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, March 29, 2003
I'm trying to get the following script to ftp transfer an uploaded image file so as to
get around a file permission problem. The upload portion of this works without
problem, the ftp portion doesn't spit out any errors either, but the file transfered
is just the name of the uploaded temp file
Thanks Jason, I'll try that, and let you know the results. Hugh
- Original Message -
From: Jason Wong [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, March 27, 2003 11:48 AM
Subject: Re: [PHP] File Upload and ftp transfer problem
On Friday 28 March 2003 03:16, Hugh Danaher
Message -
From: Hugh Danaher [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, March 27, 2003 1:16 PM
Subject: Re: [PHP] File Upload and ftp transfer problem
Thanks Jason, I'll try that, and let you know the results. Hugh
- Original Message -
From: Jason Wong [EMAIL PROTECTED
JP,
Instead of::
global $nome;
global $email;
global $linguagem;
global $browser;
try:
$nome=$_POST['nome'];
$email=$_POST['email'];
$linguagem=$_POST['linguagem'];
$browser=$_POST['browser'];
Hugh
- Original Message -
From: J. P. [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday,
Emanuele,
Some parts of the world use the coma as the separator between whole numbers
and decimals (e.g. Germany France) and php is formating the number
according to this style. I surmise that the numbers stored in your database
have been stored with comas separating the thousands from the
Charles, it sounds like you want the most recent 9 articles (...order set
to 1 so it shows up first when ...), so why not something like select *
from article_table order by id desc, limit 9 [assumes id is int not null
auto_incremented].
You could also increment the value in the field something
try two backslashes to escape php special characters
- Original Message -
From: Liam Gibbs [EMAIL PROTECTED]
To: php list [EMAIL PROTECTED]
Sent: Tuesday, March 18, 2003 12:33 AM
Subject: [PHP] Ereg sass
I'm not sure why, but I can't include a period in my eregi statement:
//When converting an image from gif to jpeg or png, you need to create an
intermediate image the same size as you want output. The following should
work, but it's not tested.
hope this helps,
Hugh
?php
$size=getimagesize($filename); // this will get the x y dimensions and the
file type (gif,
In the receiving page, change your link from an img src= tag to an a
href= then see what the error message says.
Hugh
- Original Message -
From: Nate [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, March 16, 2003 2:55 PM
Subject: [PHP] Function or GD problem?
Function or GD
}
ResizeJPG($src);
--
Thanks for your help!
Nate
Hugh Danaher [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
In the receiving page, change your link from an img src= tag to an a
href= then see what the error message says.
Hugh
- Original
The following is completely untested but might yield the results you want.
It assigns a value to the skill array, prints the post var, and then (I
hope) advances the array pointer to the next array element:
Good luck, hugh
if (count($_POST['skill'])0)
{
for
In further thought on this, I'm not sure that $_POST['skill'] is an array.
Hugh
- Original Message -
From: Stephen [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, March 13, 2003 8:47 PM
Subject: [PHP] Checkboxes
Hi
I am trying to get results form checkboxes on a form. Each
if the header and footer info come from your config.php file, then you have
to get to that file before it's parsed by the server. Perhaps, splitting
config.php into three files (header.php, config.php and footer.php), then
when you want to print just call the middle file.
Mo,
(we haven't found, in our initial research, a way to do this)
You could format your variables before they're needed in the link
something like:
if(isset($x)) $x_link=x=$x;
if(isset($y)) $y_link=y=$y;
etc.
then your link would look like the following
a
- Original Message -
From: Hugh Danaher [EMAIL PROTECTED]
To: Sebastian [EMAIL PROTECTED]
Sent: Friday, March 14, 2003 11:37 PM
Subject: Re: [PHP] str_replace
I just though up a better idea,
put your conditional statements in your included files not in the calling
file. That way
echoselect name=\$number\ size=\1\; // in this statement you are
asking that a number be a variable in php and that is not permitted.
try:
for ($i=0;$i=10;$i++)
{
echo select name=\var_name[$i]\ ; // this way your select name is
var_name[1] and not 1
also,
echo option
Kevin,
first, change your URL statement to: http://.../test.php?test=1 // the $
is not needed.
second, use $test=$_GET['test'] to get the transferred value into $test.
then, echo $test and see if it works.
Hugh
- Original Message -
From: Poon, Kelvin (Infomart) [EMAIL PROTECTED]
To:
if your system suports the commands, try imagecreatetruecolor() instead of
imagecreate(),
and imagecopyresampled() instead of imagecopyresized(),
hope this helps,
Hugh
- Original Message -
From: Michael P. Carel [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, March 12, 2003 3:23
simply:
$var1=99;
$var2=0;
$result=$var1*$var2; multiplication by zero is ok
if ($var2!=0) { //division by zero is bad != means not equal
$result=$var1/$var2;
}
use brackets in complex equations
$result=$var1*(1+$var2);
hugh
- Original Message -
From: Adriaan Nel [EMAIL PROTECTED]
some obvious errors:
$submiited on =date(1y-m-d'); // typo on submittedon and the date
format seems off, maybe you're looking for date('y-m-d') .
$query=insert into articles
(date,submitted,status,title,lead,body,submitted by)
// if the field name is submitted by then you need
Tony,
You might want to try the online php manual, I hear it's very good.
You should be able to do all of the tasks you desire. Look for image in
your search.
Hope this helps.
Hugh
- Original Message -
From: Anthony Ritter [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, March 10,
something like:
print table;
while ( statement )
{
$i++;
if ($i==1) print tr;
print td;
your image code;
print /td;
if ($i==4)
{
print /tr;
unset($i);
}
}
if ($i==1) print td/tdtd/tdtd/td/tr;
if ($i==2) print td/tdtd/td/tr;
if
Anthony,
Try:
$file_to_open=http://www.weather.com;;
$fp=fopen($file_to_open,r);
$contents=fread($fp,1); //reads to eof or ~10K whichever comes first
print $contents;
Hope this helps.
Hugh
- Original Message -
From: Anthony Ritter [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent:
Anthony,
Oh, I forgot to close the file, and it's an important step!
fclose($fp);
Hugh
- Original Message -
From: Anthony Ritter [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, March 10, 2003 7:22 PM
Subject: [PHP] newbie: contents will not output
I'm trying to test the
You might try changing ? to ?php and ? to php?
something about short tags
hugh
- Original Message -
From: Karl James [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, March 10, 2003 10:14 PM
Subject: [PHP] help needed with code!!
Can anyone give me some pointers on why im note
Actually you can input .GIF files but you can't output in that format on
most php-gd installs. The following script shows most of the steps you're
going to need to get an image resized. This script resizes files already
stored online but it can be changed to deal with a temp file.
Hope this
get your field info from a mysql search then do:
print textarea name=field rows=3
cols=50.stripslashes($array_result['field'])./textarea;
Hope this helps,
Hugh
- Original Message -
From: Mirco Ellis [EMAIL PROTECTED]
To: Php-General (E-mail) [EMAIL PROTECTED]
Sent: Friday, March 07,
depending on how the text file is organized, this can be an easy task or
impossible. But, here goes:
If a line in the text file contains all the info about the card and is
organized routinely and separated by a special character (, , ; or tab,
then you should be able to do something like the
Rob,
create a mysql table containing usernames and passwords then do something
like the following:
Hope this helps,
Hugh
?php
$db= ;
$table= ;
$db_user= ;
$db_pass= ;
if (!isset($username) or !isset($password))
{
print form action=$PHP_SELF method=post;
print log in informationbr;
print
move_uploaded_file();
- Original Message -
From: John Taylor-Johnston [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, March 05, 2003 10:33 PM
Subject: [PHP] I'm lost: text file upload
Jason, I've already been looking at:
Add the mysql_error() function to your script and run it again. Could give
you some hint at what is wrong.
$result = mysql_query($query,$connection) or die(Query
failed.mysql_error());
- Original Message -
From: Diksha Neel [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, March 03,
Help,
I've moved my upload script from one host to another, and what worked once, isn't
working now. In the new site's phpinfo file I see that file_uploads is set to no
value and in the old it was on. What do I tell my system administrator to do to
get this feature enabled?
Thanks for any
2003 13:37, Hugh Danaher wrote:
Help,
I've moved my upload script from one host to another, and what worked
once,
isn't working now. In the new site's phpinfo file I see that
file_uploads
is set to no value and in the old it was on. What do I tell my
system
administrator to do to get
A basic html input command using an image will enable you to send the
coordinates of the mouse to the next script.
input type=image src=image.jpg name=coordinate
your x,y variables will become $coordinate_x,$coordinate_y
- Original Message -
From: Minghua Yao [EMAIL PROTECTED]
To:
try ereg_replace(,,,$value);
- Original Message -
From: Jim Long [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, February 28, 2003 9:17 AM
Subject: [PHP] strip comma from $value
Hi,
I've figured out the way to solve my problem is to get rid of the commas
before I sort.
perhaps you are parsing out the spaces before inserting the vars in the
database?
- Original Message -
From: Alberto Brea [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, February 28, 2003 7:58 AM
Subject: [PHP] Spaces collapsed in database
Hi, list
I had certain information in a
Diksha,
It's very late in phpland perhaps all the coders have gone out for coffee.
However, perhaps button isn't what you want, try radio, submit or
checkbox.
Also, do a google search on html and button to see what's out there.
Cheers,
Hugh
- Original Message -
From: DIKSHA NEEL [EMAIL
Diksha,
A quick google search shows that buttons are likely a javascript thing,
not an html or php thing. Also, I agree with Jason Wong in that form
action= method= and /form tags should be in your script too.
- Original Message -
From: DIKSHA NEEL [EMAIL PROTECTED]
To: [EMAIL
Alex,
Easy to do what you want. Check out the image functions in the php
manual. There are some font limitations, specifically dealing with
alternate characters, but you'll find out what works and what doesn't soon
enough.
Hugh
- Original Message -
From: Alex Shi [EMAIL PROTECTED]
To:
Alex,
You should either use png or jpg rather than gif. The most common builds of
the gd library support those image formats--go to the GD Library site to
find out why. The support of ttf fonts should be taken up with your host.
When testing whether the code in your image creation file works,
echo(| %s | %s | %s | %s | %s |br /, $array[id], $array[username],
$array[password], $array[status], $array[notes]);
try
echo | %s | %s | %s | %s | %s |br /.$array[id]. .$array[username].
.$array[password]. .$array[status]. .$array[notes];
dots not comas between variables.
Hope this helps.
Hugh
You could use the mail() function to automatically send an email to your
user. In the email could be an html page with the same form they'd filled
out plus some hidden input fields which would tell you that they are
updating their stored information. With this, your user gets confirmation
of
If your customer views these items as different products then store them as
separate records in the same table.
My $0.02
Hugh
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, January 18, 2003 11:55 AM
Subject: [PHP] Multiple sizes for products
Hi all,
Al,
Something like the following should enable you to display a list of
whatever, then click on the record id to edit the record. This is a portion
of code which does the display, you'll need another portion to display the
record for editing.
Hugh
snip from street.php
?php
// view list
Try,
$Query=INSERT into calendar (meeting_name, meeting_place, meeting_date,
meeting_note)
values
('$meeting_name','$meeting_place','$meeting_date','$meeting_note');
Hope this helps,
Hugh
- Original Message -
From: Jason Wong [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday,
Devin,
I did a 10 question quiz for a local museum which involved using radio
buttons and automatic advance to the next question. At the end I summed the
correct answers and gave a score. I've wanted to shorten the whole thing
and use a mysql table, but...
The following snip should give you a
Nah, I didn't get it either.
- Original Message -
From: Roger Lewis [EMAIL PROTECTED]
To: Martin Towell [EMAIL PROTECTED]
Cc: Php-General [EMAIL PROTECTED]
Sent: Tuesday, December 17, 2002 10:36 PM
Subject: RE: [PHP] test
Martin,
I'm sending too [EMAIL PROTECTED] also. Never seen
you could start with something like:
$old_string=44 55 99 111;
$new_string=ereg_replace( ,,$old_string);
echo $new_string;
should display
445599111
There are other regular expression aids listed on the page at:
Eric,
When the page gets reloaded it forgets' the variables passed to it from the
previous page. Try putting the log in information and anything else needed
in hidden fields in your form.
Hugh
- Original Message -
From: eric [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, December
If you have control of the pages the visitor just left, then you should be
able to modify the links there and pass forward a variable similar to the
following.
a href=newpage.htm?var=1
Then on your receiving page you can check the value of $var and do something
with this info.
Hope this helps,
Shams,
Most database actions you want your user to do should be limited to them
writing to one record and/or updating that one record. If instead you want
to update information on several records, then you'd need a statement like:
$table=your_table_name;
$query=mysql_query(update $table set
please post lines 20 and 21, get rid of all @, the comma after url='$url'
and show your most recent code. Others have posted and given you good
advice, you should incorporate their suggestions.
hugh
- Original Message -
From: Ben C. [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent:
.);
?
-Original Message-
From: Hugh Danaher [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 05, 2002 12:07 AM
To: Ben C.
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Struggling with code
please post lines 20 and 21, get rid of all @, the comma after url='$url'
and show your most
why
'.$table.'
and not
'.$table.'
with what you've got now, I believe you are looking for
.table name.
instead of
table name
and if your table name is only one word, a good practice I'm told, ditch the
' and marks entirely
and just
try
$sql = UPDATE $table_name SET name = '.addslashes($name).', lname =
'.addslashes($lname).', mobil = '.addslashes($mobil).', email =
'.addslashes($email).', url = '.addslashes($url).', WHERE id= $id ;
// mysql needs single quote marks ( ' ) around input values that are not
numbers. The
put
if (!isset($blocker))
{
your form goes here
within your form add
print input type=hidden name=blocker value=1
end your form
}
With this, your input form is on the page when the page first loads (and
$blocker is not set), but disapears when the data is submitted
Yes I did. Thanks.
- Original Message -
From: Jason Wong [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, December 01, 2002 2:30 AM
Subject: Re: [PHP] Test links?
On Sunday 01 December 2002 15:33, Hugh Danaher wrote:
Not sure how to supress the warning message that PHP
Not sure how to supress the warning message that PHP automatically does
when you haven't got a valid URL though.
should be able to surpress errors by adding an * before the result variable
*$fp = fopen($linkdata['linkurl'],r);
Hope this helps--or even works for this particular problem.
Hugh
time to get the back end working.
Hope this helps,
Hugh
- Original Message -
From: Floyd Baker [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: 'Hugh Danaher' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, November 27, 2002 5:24 PM
Subject: Re: [PHP] dynamic arraynames
Well I might
Floyd,
if you are using mysql then you can use the mysql_list_fields to get the
names of the mysql table's column (field) names, then do mysql_num_fields to
get the number of columns (fields), then fill the columns with whatever
using a while loop.
I've attached a php page that fetches this info
Did you register just to plug this?
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, November 22, 2002 9:02 PM
Subject: [PHP] OT- Private Registrations for Domains
Has anyone heard of or used somthing like this, just received this notice
from my
Tom,
It sounds like the file you want is online someplace. So, perhaps it's
fread() that you want to use. With it, you can get the html output of a
page.
Hugh
- Original Message -
From: Tom Woody [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, November 21, 2002 9:28 AM
Subject:
Jim,
on the calling page change
echo p align=\center\image src=\$graphname\/p\n;
to
echo p align=\center\a href=\$graphname\something here/a/p\n;
Now, when you click on the link, the error message should show instead of
the broken box.
Hugh
- Original Message -
From: Jim Hatridge [EMAIL
Jim,
Regarding undefined function: imagegif(), It could be that your build of
the GD Library doesn't include gif support. You can try replacing this
function with imagejpg() or imagepng(). Imagepng() will likely be faster
and sharper than imagejpg().
Hugh
- Original Message -
From: Jim
Good lord they're at it again!
- Original Message -
From: MICHAEL OSHODI [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, November 19, 2002 10:51 PM
Subject: [PHP] REPLY NEEDED
ASSISTANCE
WE ARE MEMBERS OF A SPECIAL COMMITTEE
Just do ereg_replace( ,+,$var) on the receiving end and be done with it.
- Original Message -
From: Bob Eldred [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, November 19, 2002 11:24 PM
Subject: Re: [PHP] plus sign has changed to space after POST
I don't believe it has anything
Try:
number_format()
Hugh
- Original Message -
From: Sascha Cunz [EMAIL PROTECTED]
To: Stephen [EMAIL PROTECTED]; PHP List
[EMAIL PROTECTED]
Sent: Thursday, November 14, 2002 5:37 PM
Subject: Re: [PHP] Subtracting Money
Hi Stephen,
I'm having a problem. I need to subtract money, but
John,
Google search turned up nada. Perhaps it's just a typo.
Hugh
- Original Message -
From: @ Edwin [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, November 10, 2002 11:08 PM
Subject: Re: [PHP] h/1 tag
John Meyer [EMAIL PROTECTED] wrote:
I'm doing some PHP work, and
Stephen,
after your line:
$query = SELECT * FROM orders WHERE orderid = '$orderid';
you should add:
mysql_query($query);
in your code line you've just set your variable--you haven't asked mysql to
do anything.
Hope this helps.
Hugh
- Original Message -
From: Steve Jackson [EMAIL
Bryan,
I don't think the variable has any value before assignment--it isn't zerro
nor is it null. Check the manual for isset() and empty()'
Hope this helps.
Hugh
- Original Message -
From: Bryan McLemore [EMAIL PROTECTED]
To: PHP - General [EMAIL PROTECTED]
Sent: Sunday, November 03,
Paul,
Got any spaces or lines above the ? ?? Spaces there will kill the
script.
Hugh
- Original Message -
From: Paul [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, November 03, 2002 9:53 AM
Subject: [PHP] Am I blind? simple 15 line code producing error
Perhaps I am blind but I
What you need to do with the input number is to do an ereg_replace() and
eliminate the commas from the string, then use the string variable where
needed. Then, when you want to display the variable, use the
number_format() function.
Hope this helps,
Hugh
- Original Message -
From: [EMAIL
IFF they just left one of your other sites, then you should be able to pass
a variable in the other site's header such as:
php.net/function-name?variable=from_somewhere_I_own
if the variable isn't set, then they came from a site you don't own.
or you could send them to a unique function-name
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, and am now
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
From reading your post, I believe you've successfully gotten the file upload
to work and now you're interested in using uploaded files (but with smaller
dimensions) on your webpage. What you'll need to do is create a separate
file named resize.php which includes only the following code.
On your
You might also want to add a quality factor to the imagejpeg() function if
the image as is looks a bit ratty.
$factor=100 // or another suitable number between 100 and 0
imagejpeg($im, test/im.jpg,$factor);
hope this helps.
Hugh
- Original Message -
From: Andrew Chase [EMAIL PROTECTED]
Thanks Richard,
I changed from using img src=graphit2.php to a
href=graphit2.phpgraph/a and now get my graph, on a page of its own,
without any error messages. Works just fine, or will, when I change how it
gets its data. However, I do want to have the graph display on a page with
other
at it.
/Joakim
-Original Message-
From: hugh danaher [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 05, 2002 10:05 AM
To: php
Subject: [PHP] png image doesn't show
Hello all,
I have been trying to modify the working of one of my pages
which prints a png graph. What I had
try double \\ to escape the special characters used by php for variables and
what not. I think I read it here on a previous post.
Hope this helps
Hugh
- Original Message -
From: Beverly Steiner [EMAIL PROTECTED]
To: PHP List [EMAIL PROTECTED]
Sent: Saturday, June 29, 2002 7:58 AM
Don't know if this helps, but the following works on my system.
Hugh
?php
$picture=../photos/$userfile_name;
$size=getimagesize($picture);
$height=$size[1];
$width=$size[0];
$max=200; // maximum dimension
if ($height$width)
{
$nheight=$max;
$nwidth=$width/($height/$max);
}
else
{
imagepng() should work. you can save the file on your server then call it
up wherever you need it.
The manual has more info on using image functions just type in image.
hugh
- Original Message -
From: Campano, Troy [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, June 24, 2002
I think you can also use \t to separate the data into the various columns
needed by excel
- Original Message -
From: Alfredo [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, June 21, 2002 7:55 PM
Subject: [PHP] How to put a new line character with fputs($birthday_file,
$content);
1 - 100 of 234 matches
Mail list logo