Re: [PHP] FUNCTION TO CHECK IMAGE

2006-09-12 Thread BBC

BBC wrote:

What types of images are these? JPG, PNG, GIF?
Its jpg. Look... I don't know exactly what your point, 
I'm just asking you about the function to resolve the 
size of image like the

codes below:
if (file_exists($img_path)){
list($width,$height) = getimagesizes($img_path);
}else{
$width = $ height = $max_size;
}
So is there any other option to replace file_exists();?



Well, if I do remember correctly, then you are uploading 
a file. If
that's the case, then rather than using file_exists() 
you should be
using is_uploaded_file. Once you've verified that 
is_uploaded_file()
returns true, then use move_uploaded_file() to move the 
file to
someplace on your filesystem. If that returns true, then 
you should not
have to check file_exists again and just be able to use 
get getimagesize().


So, a good function for this would probably be:

function getUploadedImageSize($image, $to_path) {
global $max_size;

$width = $height = $max_size;

if (is_uploaded_file($image)) {
if (move_uploaded_file($image, $to_path)) {
list($width,$height) = getimagesize($to_path);
}
}

return array($width, $height);
}

list($width, $height) = getUploadedImageSize($tmp, 
'/the/final/path');


BTW, I don't know if you did a copy and paste from your 
code or if you
just typed it in really quickly, but you do have a few 
syntactical
errors in the code above. First, the image sizing 
function is
getimagesize - singular, not plural. Second, in your 
assignment
statement, you have a space where there should not be 
one:


$width = $ height = $max_size;
 ^

Just wanted to make sure you knew about that in case it 
was copied and

pasted.


thank you for your input, it really helps.

Semarakkan kemerdekaan RI ke 61 th dengan ikut bermain netkuis 17-an di 
http://netkuis.telkom.net/17an/

Kumpulkan poin sebanyak-banyaknya. Dan siap-siap tunggu rejeki dari sponsor 
kami.

 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] FUNCTION TO CHECK IMAGE

2006-09-11 Thread BBC
> What types of images are these? JPG, PNG, GIF?
Its jpg. Look... I don't know exactly what your point, I'm just asking you 
about the function to resolve the size of image like the
codes below:
if (file_exists($img_path)){
list($width,$height) = getimagesizes($img_path);
}else{
$width = $ height = $max_size;
}
So is there any other option to replace file_exists();?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] FUNCTION TO CHECK IMAGE

2006-09-10 Thread BBC
> At 12:49 AM -0700 9/10/06, BBC wrote:
> >Hi all.
> >I'm having a problem regarding image handling. Sometimes an image 
> >can be showed in browser normally (in my computer) but when I
> >upload it into my site that image is not valid, so there is an issue 
> >in my getimagesizes() function.
> >Is there any function to recover such problem? I used 
> >"if(file_exists($image_path))" but it couldn't solve the problem.
> >Input would be appreciated
> >
> 
> How are you uploading your image?
I upload a file through some form then I manipulate it's size

> 
> What is reporting your image is not valid?
> 
Size of image can't be define seem's like the image is not there, but it's not  
happened all the time.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] FUNCTION TO CHECK IMAGE

2006-09-10 Thread BBC
> BBC wrote:
> > Hi all.
> > I'm having a problem regarding image handling. Sometimes an image can be 
> > showed in browser normally (in my computer) but when I
> > upload it into my site that image is not valid, so there is an issue in my 
> > getimagesizes() function.
> > Is there any function to recover such problem? I used 
> > "if(file_exists($image_path))" but it couldn't solve the problem.
> > Input would be appreciated
>
> - From what it sounds like you are doing, you are uploading a file through
> some form, then manipulating it's size. Is this correct?

Yes it is, but the uploading was going well (size is ok). When I show the image 
on the web using getimagesizes(), 'sometimes' such
image size couldn't be resolved.
Is there any function to define that image is ok or not?

> What happens when you stop manipulating it's size and try to view just the 
> uploaded
> file?

Size of image (after or before uploading) would be same. but the issue still 
there (sometimes)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] FUNCTION TO CHECK IMAGE

2006-09-10 Thread BBC
Hi all.
I'm having a problem regarding image handling. Sometimes an image can be showed 
in browser normally (in my computer) but when I
upload it into my site that image is not valid, so there is an issue in my 
getimagesizes() function.
Is there any function to recover such problem? I used 
"if(file_exists($image_path))" but it couldn't solve the problem.
Input would be appreciated

 Best Regards
BBC
 **o<0>o**

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] header lost session variables.

2006-08-14 Thread BBC
> Hi guys.
> 
> Anyone here know why in some cases when i use (header("Location: ???"); the 
> system lost the session variables?
> 
> Any tips will be apreciated.
> Thanks in advantge.

Please tell me the cases you mean..!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: A way to stop spam on this list

2006-08-12 Thread BBC
> Hey,
> 
> 
> > Late answer,
> > 
> > but I was coming back yesterday from Palestine,
> > after the Israelien
> > Terror Authority had arrest me for making tonns of
> > photos and Videos
> > about Israeli military crime... (shooting children
> > and pregnant women)
> 
> 
> Lets keep religion, conflicts, politics and
> crappy/stupid messages (like the one above) out of the
> list the 419 Nigerian scam is more interesting
> than the above.
> 
> I am subscribed for PHP, if I want two different
> versions of "todays news" I can go to Al-Jazeera or
> one of the western news sites.
> 
> -Ryan

Take it easy guys
He didn't tell you today news, but he told you where has he been.
I'm sure you can't find such news in any sites about where he was.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] IMAGE LOADED...

2006-08-12 Thread BBC
I build a small site in which some images are loaded in all pages. I concern if 
the client have slow connection to internet.
Does any one can tell me how to send such images to client's computer?
I want to increase the speed connection by taking such image from client's 
computer when it's already set (just like cookie or
cache)

 Best Regards
BBC
 **o<0>o**

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] script to check if form is submitted from the same page?

2006-08-12 Thread BBC
> could I use this code to check if form is submitted from the same 
> page/same domain
> 
> if ($_POST['form_submitted'] == 'Yes')
> {
> if (preg_match($_SERVER['HTTP_HOST'], $_SERVER["HTTP_REFERER"]) == 0)
> {
> die ('^&[EMAIL PROTECTED]');
> }
> }


I prefer to use 'session_start();'
http://www.php.net/manual/en/function.session_start
If I'm not wrong
 Best Regards
BBC
 **o<0>o**

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] SETCOOKIE

2006-08-12 Thread BBC
Hi List,
I want to set the cookie in which that cookie would be deleted automatically as 
visitor closes the browser. I have read an article
from www.php.net/manual/en/function.setcookie  and it is told me that we can 
set that cookie by unset the value time, but it doesn't
work.

Example:
Setcookie($var, $value, time(), $path, $domain, $secure_binary);
time() = without adding.

Any one can tell me the other way ..
Thank in advance.
 Best Regards
========BBC
 **o<0>o**

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] COULD NOT RESEND HEADER..

2006-07-29 Thread BBC
Hi all.
I try to make a page which checks the entire database and folder content, which 
able to delete all invalid data's in the folder and
warns the user if an invalid data found in database. However I found the bug 
with 'header()'
The codes below are not able to resend header if it's already sent, I need your 
advice:
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Fri, 04 June 1982 05:00:00 GMT"); // Date in the 
past
header('Content-type: image/jpeg');
The error message: "could not resend header, header already sent in line.."
And I also attach the quote of data for any one whom interested (to make it 
more advance), otherwise just leave it !

 Best Regards
BBC
 **o<0>o**


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] PAYPAL TRANSACTION.

2006-07-29 Thread BBC
Hi list..

Please any one point me to the web which talk about making transaction with 
paypal step by step. Some body offered me the source
code and tutorial but until know he or she didn't send me.

 Best Regards
========BBC
 **o<0>o**

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PAYMENT TRANSACTION

2006-07-25 Thread BBC
>Hi,
>   We r using the paypal secure transaction.if u want i will send u the code 
> and the tutorials
Hi Suresh Kumar,
I'm sorry I don't reply email directly. I've been a kind of busy lately...
If you want to send the code and tutorial of pay pal secure transaction, I will 
love to.
And thank you very much.
 Best Regards
BBC
 **o<0>o**

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PAYMENT TRANSACTION

2006-07-20 Thread BBC
How are you all?
I hope some body can give me some references for internet payment.
I made a kind of shopping cart in my project; even though I was doubt in making 
it caused I don't have any idea how to make internet
transaction. But I just heard from a friend of mine that we can 'join' with 
special web site which handles payment transaction.
I'll be pleasure if some body can give references about this issue which 
explains how to collaborate with them step by step.
Thank you guys..

 Best Regards
BBC
 **o<0>o**

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PAGE TURNED BECOME SOURCE CODE VIEW..

2006-07-15 Thread BBC
> On Sun, July 9, 2006 12:00 pm, BBC wrote:
> > Hi list... Thank for answering my questions before. I love to be a
> > member of
> > this list. Guys... I got another problem with GD library v2. I don't
> > know
> > why every time the script run the syntax which uses GD, the page
> > turned
> > becomes source code view. So when we need that page in normal view, we
> > had
> > to push the 'back button' twice.
> 
> Show us the URL to your page, and its source...
> 
> We cannot guess from this description what you've managed to do.
Sorry the code I was talking about is in administrator page group, so you need 
to insert username and password to get into it.
I don't think I can give you the username and password through this list. And 
thank for the next input for error_log()..

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PAGE TURNED BECOME SOURCE CODE VIEW..

2006-07-14 Thread BBC


> On 7/9/06, BBC <[EMAIL PROTECTED]> wrote:
> > I don't know why every time the script run the syntax which uses GD, the 
> > page turned
> > becomes source code view. So when we need that page in normal view, we had
> > to push the 'back button' twice.
> 
> I guess we would need to see some code samples to get things going,
> preferrably the GD part which seems to be the issue :-)

Here are the Codes I used :

$tumbsize = 150;
$imgfile = $some_where;
$imgdst = $where_to;
header('Content-type: image/jpeg');
list($width,$height) = getimagesize($imgfile);
$imgratio = $width/$height;
if($imgratio>1)
{
 $newwidth = $tumbsize;
 $newheight = (int)($tumbsize / $imgratio);
}else{
 $newheight = $tumbsize;
 $newwidth = (int)($tumbsize * $imgratio);
}
$tumb = ImageCreateTrueColor($newwidth,$newheight);
$source = ImageCreateFromJpeg($imgfile);
$hai = 
ImageCopyResized($tumb,$source,0,0,0,0,$newwidth,$newheight,$width,$height);
ImageJpeg($tumb,$imgdst,100);
if ($hai)
{
echo "Resizing is successful ";
}else{
copy($some_where,$where_to);
}

And thank for your input..

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PAGE TURNED BECOME SOURCE CODE VIEW..

2006-07-14 Thread BBC
Hi list... Thank for answering my questions before. I love to be a member of
this list. Guys... I got another problem with GD library v2. I don't know
why every time the script run the syntax which uses GD, the page turned
becomes source code view. So when we need that page in normal view, we had
to push the 'back button' twice.

This is insecure for my page cause every body can see the source which I
should hide it. And it'll take some more time, every time we need to keep it
working normally; pushing the 'back button' twice is needed.

Does anyone have any ideas how to get page runs normally? I mean it was ok
the browser can do the script but it couldn't' show the page in normal view

Thank for your input.
     Best Regards
BBC
 **o<0>o**

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Printing in php

2006-07-05 Thread BBC
> weetat wrote:
> > Hi all ,
> >
> >  I am using PHP 4.3.2 and MYSQL .
> >
> >  I need to do printing function in php .
> >  Basically , in my client web page , it will display the list of items
> > on the html page. And i have a print button , so that the user can print
> > the html page to their local printer.
> >
> > Any way how to do this in PHP ?

I believe someone already told you,
I guess we can't do it in PHP, so why not in JavaScript
Sorry I don't mean to take you belittle, but I write this completely for
easy to look for others:
Print this page
 Best Regards
BBC
 **o<0>o**

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] About GD Version 2 or above..

2006-07-05 Thread BBC
> Take out the ; in that line and re-start your computer and you should
> have GD installed, with any luck...

Thank for your answer...
I tried your suggestion to take out the ';'. Somehow the error still there
but different out put.
"GD version 2 or above is needed" or something. So I got the conclusion that
I need to upgrade my GD version, I visited this page
http://www.php.net/manual/en/install.windows.extensions.php as Chris told
me. But I couldn't find the 'GD' version 2 or above. I got only explanation
about GD but not the GD it self. Huh.. someone please tell me where can I
get that GD or should I upgrade my PHP v4.1.1, so I can get that GD v2 or
above


> On Sun, July 2, 2006 12:42 pm, BBC wrote:
> >> Did you check if you had the required "gd" extension? I believe
> >> someone
> > already told you and how to check.
> >
> > Sorry I resent my question unintentionally
> > I believe no one did.
> > btw, what is GD extension, and how to install or load it?
> > I have read my 'php.ini', and then I found this:
> > ;extension=php_gd.dll
> > But I don't know what's that suppose to mean..
> > My system is winXP
> >
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] IMAGECOPYRESIZED(); DOESN'T WORK...

2006-07-02 Thread BBC
> Did you check if you had the required "gd" extension? I believe someone
already told you and how to check.

Sorry I resent my question unintentionally
I believe no one did.
btw, what is GD extension, and how to install or load it?
I have read my 'php.ini', and then I found this:
;extension=php_gd.dll
But I don't know what's that suppose to mean..
My system is winXP

> --
--
> http://sperling.com  http://ancientstones.com  http://earthstones.com
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] IMAGECOPYRESIZED(); DOESN'T WORK...

2006-07-01 Thread BBC
I thought I have typed this function correctly, and I didn't know why my
browser couldn't run these script :

and the error output is : "call to undefined function"
btw, I'm using PHP 4.1.1. Is there any possible that my PHP version can not
run those script?
So, what is the best solution for my problem..?

Best Regards
BBC
 **o<0>o**

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] ONE PAGE CONNECTS MANY DATABASE

2006-07-01 Thread BBC
Yes I'm using MySQL and the DataBases I mean are in different servers 
but the problem is I don't know how to set the host.
All input will be very helpful...

- Original Message - 
From: "Brad Bonkoski" <[EMAIL PROTECTED]>
To: "BBC" <[EMAIL PROTECTED]>
Cc: "PHP" 
Sent: Friday, June 30, 2006 11:07 AM
Subject: Re: [PHP] ONE PAGE CONNECTS MANY DATABASE


> Yes.
> For Mysql..
> http://www.php.net/manual/en/function.mysql-connect.php
> 
> -B
> 
> BBC wrote:
> 
> >Hi again..
> >
> >I'm wondering is it possible to make one page which connects to many
> >DataBase?
> >
> >If it's possible please tell me where can I get the references?
> >
> >Thank
> >
> > Best Regards
> >BBC
> > **o<0>o**
> >
> >  
> >
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] IMAGECOPYRESIZED(); DOESN'T WORK...

2006-07-01 Thread BBC
I thought I have typed this function correctly, and I didn't know why my
browser couldn't run these script :

and the error output is : "call to undefined function"
btw, I'm using PHP 4.1.1. Is there any possible that my PHP version can not
run those script?
So, what is the best solution for my problem..?

 Best Regards
BBC
 **o<0>o**

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] ONE PAGE CONNECTS MANY DATABASE

2006-07-01 Thread BBC
Yes I'm using MySQL and the DataBases I mean are in different servers 
but the problem is I don't know how to set the host.
All input will be very helpful...

- Original Message - 
From: "Brad Bonkoski" <[EMAIL PROTECTED]>
To: "BBC" <[EMAIL PROTECTED]>
Cc: "PHP" 
Sent: Friday, June 30, 2006 11:07 AM
Subject: Re: [PHP] ONE PAGE CONNECTS MANY DATABASE


> Yes.
> For Mysql..
> http://www.php.net/manual/en/function.mysql-connect.php
> 
> -B
> 
> BBC wrote:
> 
> >Hi again..
> >
> >I'm wondering is it possible to make one page which connects to many
> >DataBase?
> >
> >If it's possible please tell me where can I get the references?
> >
> >Thank
> >
> > Best Regards
> >BBC
> > **o<0>o**
> >
> >  
> >
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] ONE PAGE CONNECTS MANY DATABASE

2006-06-30 Thread BBC
Hi again..

I'm wondering is it possible to make one page which connects to many
DataBase?

If it's possible please tell me where can I get the references?

Thank

 Best Regards
========BBC
 **o<0>o**

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Downloading page

2006-06-30 Thread BBC
Hi all...
I'm interesting in a page (using PHP script) in internet, 
and I'd like to download that page with the complete script.
the question is:
Can I..?
and How..?
thank for your input...
 Best Regards
========BBC
 **o<0>o**

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] uploading...

2006-06-27 Thread BBC
> BBC wrote:
> > OK John
> > I'm sorry if my question was not specific
> > - The out put error was:
> > "Fatal error: call to a member function an o non object in
/url/data.php
> > on line 34"
> > - And the lines are:
> > 34.   $db->query("INSERT INTO `products`
>
> $db isn't an object. Does it connect to the database without any problems?
Yes it does. I use it in other page and it can connect to the database
properly.
Are you suggesting me to change $db, Chris?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] uploading...

2006-06-26 Thread BBC
OK John
I'm sorry if my question was not specific
- The out put error was:
"Fatal error: call to a member function an o non object in /url/data.php
on line 34"
- And the lines are:
34.   $db->query("INSERT INTO `products`
35.
(`code`,`size`,`description`,`material`,`ads`,`price`,`new`,`categorynr`)
36.   VALUES
37.   ('$code',
38.'$size',
39.'$description',
40.'$material',
41.'$ads',
42.'$price',
43.'$new',
44.'$categorynr')");

So, do you have any idea about the problem above..?
I'm wondering does any one advance have solution for it..?
 Best Regards
BBC===

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] uploading...

2006-06-26 Thread BBC
"Fatal error: call to a member function an o non object in /url/data.php on 
line 34"

and the syntax is in line 34, so what can I do..?


Please give us output of the error that mysql returns.
cheers,

BBC wrote:

hi all...
I have the problem about this syntax:

   $db->query("INSERT INTO `products`

(`code`,`size`,`description`,`material`,`ads`,`price`,`new`,`categorynr`)
   VALUES
   ('$code',
'$size',
'$description',
'$material',
'$ads',
'$price',
'$new',
'$categorynr')");

the syntax above could work properly in my computer which using PHP 4.1.1
but the problem is when I publish it the server where I hosted couldn't 
run such syntax (server uses PHP 4.4.2

I don't know why. is any one can help me?
please tell me the right syntax...

Best Regard
-BBC---


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] uploading...

2006-06-26 Thread BBC
hi all...
I have the problem about this syntax:

   $db->query("INSERT INTO `products`
   (`code`,`size`,`description`,`material`,`ads`,`price`,`new`,`categorynr`)
   VALUES
   ('$code',
'$size',
'$description',
'$material',
'$ads',
'$price',
'$new',
'$categorynr')");

the syntax above could work properly in my computer which using PHP 4.1.1
but the problem is when I publish it the server where I hosted couldn't run 
such syntax (server uses PHP 4.4.2
I don't know why. is any one can help me?
please tell me the right syntax...

Best Regard
-BBC---

[PHP] ImageCopyResized() function

2006-06-18 Thread BBC
Hi all.
is any one know how to use these functions, and what for are they:
imagecreatetruecolor();
imagecreatefromjpeg();
ImageCopyResized();
ImageDestroy();

please tell me how to use it like this function
mail($a,$b,$c,$d);
$a = "email direction where we email to";
$b = "subject of email, it will show on the inbox as a title";
$c = "the content of email";
$d = "type 'From :' and then followed by email where we send from";

[PHP] ImageCopyResized() function

2006-06-18 Thread BBC
Hi all.
is any one know how to use these functions, and what for are they:
imagecreatetruecolor();
imagecreatefromjpeg();
ImageCopyResized();
ImageDestroy();


Best regard
BBC

Re: [PHP] Using PHP/HTML effectivly

2006-06-15 Thread BBC

Thank Mr.tedd(I guess you are a man)
I think you should check one of my site http://aztec-indianart.com
while you're surfing this site actually you are visiting one page only with
different variable (see url).
I used many data in html, php, inc, txt, css, js and MySQL off course. then
I include them in one page depends on the variable
please give me your opinion about what I did (you know I just learned PHP, 
like I said before)

sorry for my English (I'm Indonesian)


- Original Message - 
From: "tedd" <[EMAIL PROTECTED]>

To: "BBC" <[EMAIL PROTECTED]>; "Alex Major" <[EMAIL PROTECTED]>;

Sent: Wednesday, June 14, 2006 5:39 PM
Subject: Re: [PHP] Using PHP/HTML effectivly



At 1:28 PM -0700 6/14/06, BBC wrote:

I used many functions as template to change the html syntax.
this is one of the function as a sample:
");
}
?>
so I don't need to type "", just call those functions.
and I don't think it works slowly (cause we just set one function for many
tables)


BBC:

Personally, I see what you are trying to do, but I would not be going that
route.

Like many others, I don't work in a shop where one group does php and
another does the designing and such -- I'm just a one man band who has to
do it all and make it work.

For me, I use php/mysql, html, js, and css all together to do stuff --
but, I try to keep them as separate as I can.

CSS helps a LOT because I can use simple html tags like:


...


And put the presentation code for the table in css. CSS seldom mixes with
php and it helps reduce the amount of code I have to review. Plus, css
separates "look" from performance (i.e., php/js/html) -- I can change one
without worrying about the other.

Typically, the amount of html code I have is far less than php. I often
roll html code segments (like header and footer) into php includes and
keep them tucked away so I don't have to look at anything except:

include(header.inc);

Now, there is html code that I have to "mix" into my php and I usually
separate it by using the method you first suggested, such as:



bunches of html code



To me, that's easy to read and I have no problem mixing stuff that way.

Occasionally, I have to "intermix" html and php together in the same
statement such as filling text field from a dB, such as:



But, it's pretty clear that I'm using php to set what the value is in an
html statement.

Even fewer times, but I still do, I intermix css, js, html, and php all
together, such as:





But still, I think it's pretty clear what I'm doing. CSS takes care of how
the button looks; js takes care of what happens when the user clicks; php
provides something from the dB; and html is the glue that holds everything
together. They all work in concert.

One of the things I keep in mind is when I start using a lot of escape
characters (as you did above), then I'm not doing it the "best way" (IMO)
and I look for another solution.

I would much rather see code

?>

...

http://sperling.com  http://ancientstones.com  http://earthstones.com


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Using PHP/HTML effectivly

2006-06-14 Thread BBC

I used many functions as template to change the html syntax.
this is one of the function as a sample:
function tabletag($border="0",$width="100%",$height="100%",$cellpadding = 
"0",$cellspacing="0",$style="")

{
 print ("cellspacing=\"$cellspacing\" cellpadding=\"$cellpadding\" 
style=\"$style\">");

}
?>
so I don't need to type "", just call those functions.
and I don't think it works slowly (cause we just set one function for many 
tables)


- Original Message - 
From: "Alex Major" <[EMAIL PROTECTED]>

To: 
Sent: Wednesday, June 14, 2006 10:37 AM
Subject: [PHP] Using PHP/HTML effectivly



Hi List,
   I've been (very slowly) working my way through some basic php, and
putting it into my html site. However recently (after trying things out 
such

as cookies or redirects where they have to be set before any page output)
I've found that the combination or certainly the way that I'm using php 
and

html together dosn't seem to go too well.

I have a question to you experienced PHP developers, how do you mix the
html/php together. When I've looked at things like the PHPBB forums, and
gone through files they will have absolutly no HTML, just php code. I'm 
not

sure how they manage their page styling, if anyone could explain this too
me.

At the moment I have things such as







I'm sure that I'm not doing it the best possible way, so if anyone has any
tips for me.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] references for beginner...

2006-06-14 Thread BBC

Thank Mr.Figaro.

- Original Message - 
From: "nicolas figaro" <[EMAIL PROTECTED]>

To: 
Sent: Wednesday, June 14, 2006 5:21 AM
Subject: Re: [PHP] references for beginner...



BBC a écrit :

Hii all
I just joined this forum, I'm beginner of PHP programming.

welcome.
I didn't understand almost all the syntax you're talking about (ups too 
honest, right?), so please...
Does anyone have a kinds of references like soft books or something, 
which talk about all the syntax, and what for are they (also how to use 
if necessary)

and where can I download it?

http://www.php.net/manual/ could be a good starting point.
N F

thank for all references
best regard
BBC



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] references for beginner...

2006-06-14 Thread BBC

Hii all
I just joined this forum, I'm beginner of PHP programming.
I didn't understand almost all the syntax you're talking about (ups too 
honest, right?), so please...
Does anyone have a kinds of references like soft books or something, which 
talk about all the syntax, and what for are they (also how to use if 
necessary)

and where can I download it?
thank for all references
best regard
BBC

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php