how can I set a variable in php to be a special character?
Setting a vriable in php to a special character?
$str=chr(27);
chr(charcode)
this would be an escape char, I am assuming you mean non printable chars.
You can search for ASCII charts to show a list of all character codes.
Reply:$var = "#"; //this kind of special character?
Monday, May 24, 2010
How can I make a PHP frame just of a login form that logs in to a forum on a different page?
I'm not sure what you are asking, but you can place any content inside another Web page via iframe:
%26lt;iframe src="login.php"%26gt;%26lt;/iframe%26gt;
%26lt;iframe src="login.php"%26gt;%26lt;/iframe%26gt;
What is a good, free PHP project management application?
I work in an office of 10 people, and have been charged with researching and implementing a project management system that will allow us to stop using voicemail, email and post-it notes to assign tasks to each other, and instead to consolidate our workloads in a system specifically designed for such a use.
The ideal system would be free, open source, and PHP. A Mac OSX executable is also possible. An excess of features is not necessary, and a simple interface would be best.
Any experience with these products or knowledgeable recommendations would be most appreciated.
What is a good, free PHP project management application?
The link below lists a variety of open-source PM products, including some that are PHP-based. Unfortunately I can't speak to their effectiveness, but that would depend on your particular situation anyway.
Besides the s/w, you might also want to consider some basic project management training for the office. You will probably find that this allows you to work more effectively even without any s/w, but also to get better value from any s/w. Taking a bit of training prior to investing time and effort into s/w might also help you understand what you really need.
stamen
The ideal system would be free, open source, and PHP. A Mac OSX executable is also possible. An excess of features is not necessary, and a simple interface would be best.
Any experience with these products or knowledgeable recommendations would be most appreciated.
What is a good, free PHP project management application?
The link below lists a variety of open-source PM products, including some that are PHP-based. Unfortunately I can't speak to their effectiveness, but that would depend on your particular situation anyway.
Besides the s/w, you might also want to consider some basic project management training for the office. You will probably find that this allows you to work more effectively even without any s/w, but also to get better value from any s/w. Taking a bit of training prior to investing time and effort into s/w might also help you understand what you really need.
stamen
Setting a vriable in php to a special character?
how can I set a variable in php to be a special character?
Setting a vriable in php to a special character?
use $var=chr(charcode)
if you mean non printable characters such as Chr(10)+chr(12) CR/LF combos
Setting a vriable in php to a special character?
use $var=chr(charcode)
if you mean non printable characters such as Chr(10)+chr(12) CR/LF combos
How many Kilometers does the 7.50 PHP minimum jeepney fare cover?
and how much for every additional kilometer after that?
How many Kilometers does the 7.50 PHP minimum jeepney fare cover?
7.50 for 5 km. then 1.00 every km.
Reply:5 kilometers
Reply:5
Reply:The P7.50 minimum fare of jeepneys is for the first four (4) kilometers.
"As of Jan '06 minimum fare is P 7.50 while the per kilometer additional fare is P 1.25. ..."
http://wikitravel.org/en/Metro_Manila
"The first 4 km is about Php 7.50 and every succeeding kilometer is an additional Php 1.25."
http://www.associatedcontent.com/article...
Reply:From PNA, the minimum fare for jeepneys is P7.50 for the first four kilometers plus P1.25 per succeeding kilometers.
http://www.gov.ph/news/default.asp?i=108...
Just recently published in Inquirer.net, public utility buses and jeepneys filed for separate petitions for provisional fare increases to cope with the rising prices of fuel.
Regular provincial buses are asking for a provisional increase of P1.25 for the first five kilometers and P0.15 for the succeeding kilometers. This will increase their fare from the current P8.50 to P9.75.
Airconditioned provincial buses are seeking a provisional increase of P0.35 per kilometer.
Meanwhile, Metro Manila regular buses are asking for a provisional increase of P1 for the first five kilometers and P0.25 for the succeeding kilometers, raising their fare from P8 to P9.
Metro Manila airconditioned buses are asking for a provisional increase of P2 for the first five kilometers and P0.35 for the succeeding kilometers, which will increase the fare from P10 to P12.
Reply:Here in Manila, it's 7.50 for the first 4 kilometeres. Then 1.25 every kilometer thereafter. In the provinces, I believe there is a different scheme.
Reply:5km
Reply:4
and 1 peso for every additional km.
How many Kilometers does the 7.50 PHP minimum jeepney fare cover?
7.50 for 5 km. then 1.00 every km.
Reply:5 kilometers
Reply:5
Reply:The P7.50 minimum fare of jeepneys is for the first four (4) kilometers.
"As of Jan '06 minimum fare is P 7.50 while the per kilometer additional fare is P 1.25. ..."
http://wikitravel.org/en/Metro_Manila
"The first 4 km is about Php 7.50 and every succeeding kilometer is an additional Php 1.25."
http://www.associatedcontent.com/article...
Reply:From PNA, the minimum fare for jeepneys is P7.50 for the first four kilometers plus P1.25 per succeeding kilometers.
http://www.gov.ph/news/default.asp?i=108...
Just recently published in Inquirer.net, public utility buses and jeepneys filed for separate petitions for provisional fare increases to cope with the rising prices of fuel.
Regular provincial buses are asking for a provisional increase of P1.25 for the first five kilometers and P0.15 for the succeeding kilometers. This will increase their fare from the current P8.50 to P9.75.
Airconditioned provincial buses are seeking a provisional increase of P0.35 per kilometer.
Meanwhile, Metro Manila regular buses are asking for a provisional increase of P1 for the first five kilometers and P0.25 for the succeeding kilometers, raising their fare from P8 to P9.
Metro Manila airconditioned buses are asking for a provisional increase of P2 for the first five kilometers and P0.35 for the succeeding kilometers, which will increase the fare from P10 to P12.
Reply:Here in Manila, it's 7.50 for the first 4 kilometeres. Then 1.25 every kilometer thereafter. In the provinces, I believe there is a different scheme.
Reply:5km
Reply:4
and 1 peso for every additional km.
How do I get the file name in PHP?
What is the script needed to get the current file name of the opened php file? Thanks.
How do I get the file name in PHP?
The constant __FILE__ returns something like:
c:\Inetpub\wwwroot\test\phpinfo.php
This actually is the full physical path of the file containing the line.
Combine it with basename function:
basename( __FILE__ )
returns:
phpinfo.php
Lastly, there is a variable called PHP_SELF in $_SERVER. You can access it as:
$_SERVER[ "PHP_SELF" ]
This gives virtual path of the file:
/test/phpinfo.php
How do I get the file name in PHP?
The constant __FILE__ returns something like:
c:\Inetpub\wwwroot\test\phpinfo.php
This actually is the full physical path of the file containing the line.
Combine it with basename function:
basename( __FILE__ )
returns:
phpinfo.php
Lastly, there is a variable called PHP_SELF in $_SERVER. You can access it as:
$_SERVER[ "PHP_SELF" ]
This gives virtual path of the file:
/test/phpinfo.php
Does anyone know anything about using Sokkit to install PHP on my computer?
If so, is there anything I need to know before installing it?
Does anyone know anything about using Sokkit to install PHP on my computer?
http://www.cebuplus.com/computer/442/sof...
sim cards
Does anyone know anything about using Sokkit to install PHP on my computer?
http://www.cebuplus.com/computer/442/sof...
sim cards
What is PhP and how does it differ from HTML?
I currently have a website with html pages, but I want to use php because I was told my javascript headline scroller is not 'read' or indexed by search engine robots. If I use php, then I can get a different headline scroller that will be indexed by 'bots. Make sense? I'm confused. Anyhow...how do I change current html pages to php? can I just rename them with different extension or is it more complicated than that? Thanks.
What is PhP and how does it differ from HTML?
PHP (PHP HyperText Pre-processor) is a scripting language whose syntax is similar to C/C++. HTML and PHP are two different worlds. In order to run PHP, you need to use a server (Usually Linux/Unix...most hosting services are this way) that supports PHP (They all pretty much do). Next, you must take some tutorials about PHP. I recommend a good book, or just some web tutorials. http://www.w3schools.com is a good source for just about anything.
PHP is free and fairly simple to learn. It is very powerful and stable. PHP can dynamically generate your HTML if you want it to. This is usually a good idea when displaying large numbers of records retrieved from a database (But that's in the future;-). Using a simple tutorial, you should have a working PHP page in minutes. Good Luck!
Reply:A good place to start learning PHP (besides reading the online manual at www.php.net) is the articles at www.webmonkey.com and www.zend.com Report It
Reply:Think of a php page as a server side HTML page. It is very similar to ASP (Active Server Pages) from Microsoft. With php you can create more dynamic and interactive web content for your pages. The only difference between a php page and an HTML page is some embedded code you insert to the HTML page.
Reply:It's not simple, PHP is a seperate programming language from HTML. You'd have to buy a book or go to a class to learn it and then reprogram your website using the new language.
Reply:Php is something you imbed into html
What is PhP and how does it differ from HTML?
PHP (PHP HyperText Pre-processor) is a scripting language whose syntax is similar to C/C++. HTML and PHP are two different worlds. In order to run PHP, you need to use a server (Usually Linux/Unix...most hosting services are this way) that supports PHP (They all pretty much do). Next, you must take some tutorials about PHP. I recommend a good book, or just some web tutorials. http://www.w3schools.com is a good source for just about anything.
PHP is free and fairly simple to learn. It is very powerful and stable. PHP can dynamically generate your HTML if you want it to. This is usually a good idea when displaying large numbers of records retrieved from a database (But that's in the future;-). Using a simple tutorial, you should have a working PHP page in minutes. Good Luck!
Reply:A good place to start learning PHP (besides reading the online manual at www.php.net) is the articles at www.webmonkey.com and www.zend.com Report It
Reply:Think of a php page as a server side HTML page. It is very similar to ASP (Active Server Pages) from Microsoft. With php you can create more dynamic and interactive web content for your pages. The only difference between a php page and an HTML page is some embedded code you insert to the HTML page.
Reply:It's not simple, PHP is a seperate programming language from HTML. You'd have to buy a book or go to a class to learn it and then reprogram your website using the new language.
Reply:Php is something you imbed into html
Can i upload php program on the web for free?
I have a simple web application written in php. I've been looking for a free webserver to upload my program.but unfortunately i ddnt find any free webserver.
Can i upload php program on the web for free?
Yes. For the list of free hosting providers, visit the following.
http://www.0php.com/free_PHP_hosting.php
Reply:You could try http://www.justfree.com/ .
Another option is very cheap hosting at http://nearlyfreespeech.net/ , which will only charge you for what you actually use and you can start for as little as $0.25
Can i upload php program on the web for free?
Yes. For the list of free hosting providers, visit the following.
http://www.0php.com/free_PHP_hosting.php
Reply:You could try http://www.justfree.com/ .
Another option is very cheap hosting at http://nearlyfreespeech.net/ , which will only charge you for what you actually use and you can start for as little as $0.25
How do you make picture images with numbers in with PHP?
For example when you sign up to a hotmail account you have to type the numbers which you see on the image into a box. Can anyone tell me how to make one? so that my site is more secure to stop thousands of accounts been made by bots.
Im quite good with PHP so feel free to use the big words :)
How do you make picture images with numbers in with PHP?
There is a complete tutorial on this subject on sitepoint's website.
http://www.sitepoint.com/article/toughen...
Reply:It's called CAPTCHA.
http://codewalkers.com/tutorials/95/1.ht...
Im quite good with PHP so feel free to use the big words :)
How do you make picture images with numbers in with PHP?
There is a complete tutorial on this subject on sitepoint's website.
http://www.sitepoint.com/article/toughen...
Reply:It's called CAPTCHA.
http://codewalkers.com/tutorials/95/1.ht...
What are PHP files? What do they do and how do I make them?
A friend has a website and wishes to use php files to create a promotional gallery of images. Apparently php files are a possible solution but I need to know if there are alternatives which offer similar results... and if not, is there a simple program which will produce / output php files. Please keep it simple as, although I have used PC's for over 20 years... php files are new to me!
What are PHP files? What do they do and how do I make them?
Take a look at http://gallery.menalto.com/ which does pretty much anything you could want along the lines of a photo gallery.
Reply:PHP is a server-side programming langauge used for maintaining dynamic content on a website. It is used in conjunction with an SQL database on a server to store the content, with the PHP page being the avenue through which the data is parsed.
There is no php "generator" software.
To create a php file, you need to learn the php language, and at the very least, the basics of SQL.
There are PHP scripts available on the net for free all over, but you need a basic understanding of the language to implement them.
ASP is another language that produces the same results. Again, it is a programming language and to use it, you will need to know it.
Hope this helps.
Reply:PHP is a programming language .php is its format an its a server side language
Reply:Everyone else answered correctly, but didn't point you to a starting point. Start here:
http://www.php.net/manual/en/index.php
Reply:Is it a dynamic gallery that changes the displayed pictures when it is loaded? Search for "Gallery scripts", or "flash gallery" or something similiar and you will find ready made scripts/flash objects
Reply:PHP files are templates with program code embedded in them. You need to learn the PHP programming language in order to do much with the language though, http://php.net is a good starting point.
Reply:How to build your photo gallery depends very much on what you want it to do. Php is a server side scripting language that parses code on the fly, and dynamically outputs html. The output generated by a php script can be determined by user interaction (usually with forms), server and network settings, and many other types of input. PHP mimics the c programming language in syntax.
If you are looking to just simply show a few images that will pop up in a new window, you can do this with some basic html. However, if you are looking to output different images (maybe random), say, every time you visit the page, then php may be a solution. You could also use javascript, or asp, or c#, c, c++...
Start by learning html. If you want to learn php, here is a good site.
http://mrarrowhead.com/
Reply:PHP generates HTML pages dynamically as well as performing other operations. An alternative would be Microsofts ASP.Net
You do not have to create the PHP pages yourself. There are several solutions already completed for routine tasks such as galleries. There are single page Flash displays, and picture browsing PHP applications.
Flash:
http://www.airtightinteractive.com/simpl...
http://www.flashgallery.org/
http://www.coffeecup.com/photo-gallery/
PHP:
http://spgm.sourceforge.net/
http://gallery.menalto.com/
http://www.phpalbum.net/
http://www.flash-here.com/downloads/fhim...
and
http://www.bigfolio.com/drop_proof/
As far as learning PHP, just use a search engine. search for "PHP read directory" to learn how to browse a directory of pictures. You can learn "foreach" and "while( $file = fgets($dir)) " to iterate through the directory and list each file. To print to the screen you have many choices like "php echo" and "php printf()"
garden ridge
What are PHP files? What do they do and how do I make them?
Take a look at http://gallery.menalto.com/ which does pretty much anything you could want along the lines of a photo gallery.
Reply:PHP is a server-side programming langauge used for maintaining dynamic content on a website. It is used in conjunction with an SQL database on a server to store the content, with the PHP page being the avenue through which the data is parsed.
There is no php "generator" software.
To create a php file, you need to learn the php language, and at the very least, the basics of SQL.
There are PHP scripts available on the net for free all over, but you need a basic understanding of the language to implement them.
ASP is another language that produces the same results. Again, it is a programming language and to use it, you will need to know it.
Hope this helps.
Reply:PHP is a programming language .php is its format an its a server side language
Reply:Everyone else answered correctly, but didn't point you to a starting point. Start here:
http://www.php.net/manual/en/index.php
Reply:Is it a dynamic gallery that changes the displayed pictures when it is loaded? Search for "Gallery scripts", or "flash gallery" or something similiar and you will find ready made scripts/flash objects
Reply:PHP files are templates with program code embedded in them. You need to learn the PHP programming language in order to do much with the language though, http://php.net is a good starting point.
Reply:How to build your photo gallery depends very much on what you want it to do. Php is a server side scripting language that parses code on the fly, and dynamically outputs html. The output generated by a php script can be determined by user interaction (usually with forms), server and network settings, and many other types of input. PHP mimics the c programming language in syntax.
If you are looking to just simply show a few images that will pop up in a new window, you can do this with some basic html. However, if you are looking to output different images (maybe random), say, every time you visit the page, then php may be a solution. You could also use javascript, or asp, or c#, c, c++...
Start by learning html. If you want to learn php, here is a good site.
http://mrarrowhead.com/
Reply:PHP generates HTML pages dynamically as well as performing other operations. An alternative would be Microsofts ASP.Net
You do not have to create the PHP pages yourself. There are several solutions already completed for routine tasks such as galleries. There are single page Flash displays, and picture browsing PHP applications.
Flash:
http://www.airtightinteractive.com/simpl...
http://www.flashgallery.org/
http://www.coffeecup.com/photo-gallery/
PHP:
http://spgm.sourceforge.net/
http://gallery.menalto.com/
http://www.phpalbum.net/
http://www.flash-here.com/downloads/fhim...
and
http://www.bigfolio.com/drop_proof/
As far as learning PHP, just use a search engine. search for "PHP read directory" to learn how to browse a directory of pictures. You can learn "foreach" and "while( $file = fgets($dir)) " to iterate through the directory and list each file. To print to the screen you have many choices like "php echo" and "php printf()"
garden ridge
Anyone know where I can find some tutorials on how to build an online store in PHP and MySQL?
I am trying to build an online store and I could use some help specifically with the construction of the database. I need to know the proper way to setup the database so that I can keep track of all the necessary information an online store requires. Anyone have any tips or advice about this?
Anyone know where I can find some tutorials on how to build an online store in PHP and MySQL?
The mysql and php sites both have docs and tutorials. But if you aren't already an experienced programmer with these tools, I would look for a package that's already written. It takes a lot of work to create something secure and easy to use.
Reply:You can make use of readymade scripts like Oscommerce for making an online store.
For database specific help, the mysql docs are the best bets. You can download your version at
www.mysql.com
Anyone know where I can find some tutorials on how to build an online store in PHP and MySQL?
The mysql and php sites both have docs and tutorials. But if you aren't already an experienced programmer with these tools, I would look for a package that's already written. It takes a lot of work to create something secure and easy to use.
Reply:You can make use of readymade scripts like Oscommerce for making an online store.
For database specific help, the mysql docs are the best bets. You can download your version at
www.mysql.com
How do I do a random text verification in PHP?
You know how when you go to, for example, TicketMaster.com and you have to enter the "random" code? How do I do this using PHP and SQL?
How do I do a random text verification in PHP?
You will have to know how to create a skewed images with the image manipulation ability of php and then take it from there. You do not need a database.
RJ
How do I do a random text verification in PHP?
You will have to know how to create a skewed images with the image manipulation ability of php and then take it from there. You do not need a database.
RJ
How does php scripting work?
How does php scripting actually work? What is php? Can anyone explain php scripting in a nutshell? Any example of work or project done by php scripting? Thanks people.
How does php scripting work?
What is PHP?
PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML.
That is directly from http://www.php.net/
My description...
PHP is a programming language primarily used for developing client-server website applications. It is frequently paired with MySQL databases to perform various data-driven applications such as shopping carts, forums, photo albums, social networking sites, etc...The PHP code resides on the server and generates HTML pages that the client's web browser parses so you see an actual HTML page, not the underlying PHP code when you visit the website. If you come across any web page that ends in .php instead of .html then that page is being generated by PHP code. Good examples of PHP code would be phpBB, the forum application, and Joomla, the content management system.
Reply:PHP actually runs on the web server sending only the output to the client. A lot of people like it because the code can not get stolen like java script or perl. With PHP you can communicate with databases, read files, etc. Quite a few web sites uses PHP these days because it allows you to create dynamic web pages based. You can even use it to combine pictures or otherwise modify them. Have you noticed that quite a few websites are going to a security question login. My bank even uses a picture around the login that I chose. If the picture is not present and not the one I chose, they say to contact them because it is not their site. I am sure that is PHP because they have overlaid the date on the picture and login (probably CSS).
Reply:php scripts contain code written in the php programming (or scripting) language, and interlaced html code. The server on which the php scripts reside must have the capacity to interpret php. When you request a php file via web browser (a http request), the web server first runs that php script, to generate the html code to be sent to your web browser. The html code therefore will depend on the input you provided, or perhaps some data obtained from a database. PHP therefore generates html code on the fly (or dynamically) as opposed to a static html file residing in the server.
Reply:To put it simple the it it a server side scripting language meaning that the web server handles all the coding instead of the client
a simple bit of PHP would be hello world:
%26lt;?php
echo "Hello World!";
?%26gt;
Reply:A PHP engine receives some coded instructions, it acts on those instructions, and passes its output somewhere.
http://php.net/ has a lot of information.
Large chunks of Yahoo! are written in PHP.
How does php scripting work?
What is PHP?
PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML.
That is directly from http://www.php.net/
My description...
PHP is a programming language primarily used for developing client-server website applications. It is frequently paired with MySQL databases to perform various data-driven applications such as shopping carts, forums, photo albums, social networking sites, etc...The PHP code resides on the server and generates HTML pages that the client's web browser parses so you see an actual HTML page, not the underlying PHP code when you visit the website. If you come across any web page that ends in .php instead of .html then that page is being generated by PHP code. Good examples of PHP code would be phpBB, the forum application, and Joomla, the content management system.
Reply:PHP actually runs on the web server sending only the output to the client. A lot of people like it because the code can not get stolen like java script or perl. With PHP you can communicate with databases, read files, etc. Quite a few web sites uses PHP these days because it allows you to create dynamic web pages based. You can even use it to combine pictures or otherwise modify them. Have you noticed that quite a few websites are going to a security question login. My bank even uses a picture around the login that I chose. If the picture is not present and not the one I chose, they say to contact them because it is not their site. I am sure that is PHP because they have overlaid the date on the picture and login (probably CSS).
Reply:php scripts contain code written in the php programming (or scripting) language, and interlaced html code. The server on which the php scripts reside must have the capacity to interpret php. When you request a php file via web browser (a http request), the web server first runs that php script, to generate the html code to be sent to your web browser. The html code therefore will depend on the input you provided, or perhaps some data obtained from a database. PHP therefore generates html code on the fly (or dynamically) as opposed to a static html file residing in the server.
Reply:To put it simple the it it a server side scripting language meaning that the web server handles all the coding instead of the client
a simple bit of PHP would be hello world:
%26lt;?php
echo "Hello World!";
?%26gt;
Reply:A PHP engine receives some coded instructions, it acts on those instructions, and passes its output somewhere.
http://php.net/ has a lot of information.
Large chunks of Yahoo! are written in PHP.
How do I add links to new pages that will be uploaded to a remote php test server which is not my own server?
When I make the pages and links on the local server all the links appear and seem to work, but when they are put in the remote server (the test php server at another location) the links do not appear in the links column (subnav section).
How do I add links to new pages that will be uploaded to a remote php test server which is not my own server?
You are probably using absolute links (e.g., http://localhost/page.php) in the links, rather than relative links (e.g., page.php). Check your links and make sure they are not absolute links.
flowers for algernon
How do I add links to new pages that will be uploaded to a remote php test server which is not my own server?
You are probably using absolute links (e.g., http://localhost/page.php) in the links, rather than relative links (e.g., page.php). Check your links and make sure they are not absolute links.
flowers for algernon
How to install and configure PHP, Apache and MySQL on Linux ? How to do their interconnectivity on any linux?
--It is possible to use GUI only (no Shell Commands) for this?
--It will be better if answer is applicable to any linux
--Any ebooks on PHP,Apache,MySQL?
How to install and configure PHP, Apache and MySQL on Linux ? How to do their interconnectivity on any linux?
Use Linux with no shell commands: definitely not.
If you plan on running a web server on a linux box, your going to need to know shell commands. Even if you can somehow get around without using shell commands during the install. You -WILL- need them to configure, maintain, and do fine turning.
Try using this site: http://lamphowto.com/
Reply:lmao
what distro
u need to either
apt-get install apache mysql php
or
yum install apache mysql php
u will also need to install
mod_php or mod_mysql
they may come with the initial package
some distro's let u do
tasksel
and just choose lamp from the menu
after all is isntalled u'll need to make apache run as the proper user should be www-data or nobody
u need to set the ServerName to match whats in
/etc/hosts
if running locally u can leave at localhost
then u can comment out the extension mysql in php.ini
and u can use the LoadModule directive to load either php4 or 5 into apache.conf or httpd.conf
u'll need to configure the servers to start on boot
chkconfig apache on
chkconfig mysql on
mysql will complain about running as root so
do
mysqld %26amp;
then
mysql -u root
get into the client shell and do
grant all privileges on *.* to 'username'@'localhost' identified by 'password' with grant option;
that command will give u a username and password other than root to use on mysql,, now start the servers with the rc or init.d scripts in /etc/rc.d/* or /etc/init.d/* so
/etc/rc.d/mysqld start %26amp;%26amp; /etc/rc.d/httpd start
this can be in init.d as well
if u get errors check the log files
u prolly need to comment out unique ID's in apache to run on the localhost,, u should be able to drop a test php script in the apache document root and
chmod o+x test.php
and view it in a browser to see if the php is enabled
u can also run
php -i | grep 'configure'
to see how php was built
php -v shows the version running
the preferable way is to make and install the programs from source however i won't explain that as it is out the boundaries of yahoo answers. =)
aaron@jvnetworks.net
--It will be better if answer is applicable to any linux
--Any ebooks on PHP,Apache,MySQL?
How to install and configure PHP, Apache and MySQL on Linux ? How to do their interconnectivity on any linux?
Use Linux with no shell commands: definitely not.
If you plan on running a web server on a linux box, your going to need to know shell commands. Even if you can somehow get around without using shell commands during the install. You -WILL- need them to configure, maintain, and do fine turning.
Try using this site: http://lamphowto.com/
Reply:lmao
what distro
u need to either
apt-get install apache mysql php
or
yum install apache mysql php
u will also need to install
mod_php or mod_mysql
they may come with the initial package
some distro's let u do
tasksel
and just choose lamp from the menu
after all is isntalled u'll need to make apache run as the proper user should be www-data or nobody
u need to set the ServerName to match whats in
/etc/hosts
if running locally u can leave at localhost
then u can comment out the extension mysql in php.ini
and u can use the LoadModule directive to load either php4 or 5 into apache.conf or httpd.conf
u'll need to configure the servers to start on boot
chkconfig apache on
chkconfig mysql on
mysql will complain about running as root so
do
mysqld %26amp;
then
mysql -u root
get into the client shell and do
grant all privileges on *.* to 'username'@'localhost' identified by 'password' with grant option;
that command will give u a username and password other than root to use on mysql,, now start the servers with the rc or init.d scripts in /etc/rc.d/* or /etc/init.d/* so
/etc/rc.d/mysqld start %26amp;%26amp; /etc/rc.d/httpd start
this can be in init.d as well
if u get errors check the log files
u prolly need to comment out unique ID's in apache to run on the localhost,, u should be able to drop a test php script in the apache document root and
chmod o+x test.php
and view it in a browser to see if the php is enabled
u can also run
php -i | grep 'configure'
to see how php was built
php -v shows the version running
the preferable way is to make and install the programs from source however i won't explain that as it is out the boundaries of yahoo answers. =)
aaron@jvnetworks.net
How do I remove line brakes from data comming from a textarea input with php?
you need to remove the /n in the php file. But if you do that, all the data will come on one line.
also, html line breaks look like this: %26lt;br%26gt; so you can remove those too if they are there.
also, html line breaks look like this: %26lt;br%26gt; so you can remove those too if they are there.
What is the php code to hide the file extensions in the url?
How can the file name, the file extension and the query string of the url shown in the address bar of the browser be hidden? It must be shown as in yahoo and gmail. The scripting language used is php. Is there any predefined functions for hiding the filenames and the query string of the url in php? A sample code implementing this in php is needed. How can the changes be done in the .htaccess file? An example with a simple demo will do.
What is the php code to hide the file extensions in the url?
This is done through apache.
The query can be hidden by doing POSTs instead of GETs.
Reply:You can work with POST's as stated in the previous answer or you can work with sessions or url encoding or .htaccess (mod_rewrite)
What is the php code to hide the file extensions in the url?
This is done through apache.
The query can be hidden by doing POSTs instead of GETs.
Reply:You can work with POST's as stated in the previous answer or you can work with sessions or url encoding or .htaccess (mod_rewrite)
What is a good book to learn php and mysql?
I see various on amazon... obviously the php and mysql for dummies is calling to be just because of the name. is there a better book for the money?
What is a good book to learn php and mysql?
Look for books from wrox - they are generally very comprehensive.
You might want to browse through w3schools.com first, though, to get a grasp on the basics.
If you have never programmed in a scripting language before, PHP is a good choice (but you can expect some learning overhead with MySQL).
Try out some open source applications which use PHP and MySQL, look over their code to get an idea of basic programming techniques.
You should also check out Philip Greenspun's introduction to Database Management Systems for some high-level concepts which will serve you well in MySQL:
http://philip.greenspun.com/sql/introduc...
business cards
What is a good book to learn php and mysql?
Look for books from wrox - they are generally very comprehensive.
You might want to browse through w3schools.com first, though, to get a grasp on the basics.
If you have never programmed in a scripting language before, PHP is a good choice (but you can expect some learning overhead with MySQL).
Try out some open source applications which use PHP and MySQL, look over their code to get an idea of basic programming techniques.
You should also check out Philip Greenspun's introduction to Database Management Systems for some high-level concepts which will serve you well in MySQL:
http://philip.greenspun.com/sql/introduc...
business cards
Where can I purchase USD using PHP in Manila?
I am a Filipino citizen and would like to trade currencies
Where can I purchase USD using PHP in Manila?
Open a forex account online. Try DB.
[Update]: I meant open an account with a reputable investment bank like DB (Deutsche Bank,etc). They provide online forex trading capabilities and research reports as well.
Where can I purchase USD using PHP in Manila?
Open a forex account online. Try DB.
[Update]: I meant open an account with a reputable investment bank like DB (Deutsche Bank,etc). They provide online forex trading capabilities and research reports as well.
How to install Apache and PHP in windows without problems?
i have installed the last wersion of both free software in windows XP, many times , but always have a problem
How to install Apache and PHP in windows without problems?
You can try XAMPP when in trouble.
http://www.apachefriends.org/en/xampp.ht...
Reply:Install a WAMP bundle. (Apache MySql +PHP, all in one install package).
Reply:As Julius S said; install WAMP. It's the only package I've been able to install that works flawlessly and quite well.
Reply:eh eh ehhhhhhhhhhhhhhhhhh
Reply:http://www.wampserver.com
apache, mysql, php together ;)
birthday cards
How to install Apache and PHP in windows without problems?
You can try XAMPP when in trouble.
http://www.apachefriends.org/en/xampp.ht...
Reply:Install a WAMP bundle. (Apache MySql +PHP, all in one install package).
Reply:As Julius S said; install WAMP. It's the only package I've been able to install that works flawlessly and quite well.
Reply:eh eh ehhhhhhhhhhhhhhhhhh
Reply:http://www.wampserver.com
apache, mysql, php together ;)
birthday cards
Where is best to start learning php programming from scratch?
where is best to start learning php programming from scratch?
i know nothing about web programming - not even html - so where is the best place to do it? ( pls don't tell me to search online or go to a school)
Where is best to start learning php programming from scratch?
I learnt everything including html, javascript, ASP, CSS, PHP etc.. from http://www.w3schools.com
The website is free, and you get tutorials from the very basics till some advanced point. You will get to learn lots of web programming languages for free, plus there is no need for you to register.
PHP and ASP do not run directly on your computer. You need to setup a server on your computer, you will get the tutorials to do so on that website
Reply:learn the programming just do as read codes and read codes
Reply:I think u better start from
http://www.w3schools.com/
and after that go to site
http://www.php.net/
if u refer these 2 sites you will know each n evything abt PHP
i know nothing about web programming - not even html - so where is the best place to do it? ( pls don't tell me to search online or go to a school)
Where is best to start learning php programming from scratch?
I learnt everything including html, javascript, ASP, CSS, PHP etc.. from http://www.w3schools.com
The website is free, and you get tutorials from the very basics till some advanced point. You will get to learn lots of web programming languages for free, plus there is no need for you to register.
PHP and ASP do not run directly on your computer. You need to setup a server on your computer, you will get the tutorials to do so on that website
Reply:learn the programming just do as read codes and read codes
Reply:I think u better start from
http://www.w3schools.com/
and after that go to site
http://www.php.net/
if u refer these 2 sites you will know each n evything abt PHP
How do I add meta and description in my php website?
My web freelancer has gone on holiday and he has not put the meta and decription in my website. I have FTP access but cannot find the header.php file. Does anyone know the code I can use and how I can manually add the meta and desc tags to my php pages? Thanks so much in advance.
How do I add meta and description in my php website?
http://www.w3schools.com/php/
http://websitetips.com/php/
Reply:You'll have to download the header.php file, add it there, then re-upload it.
These tags need to go in between the %26lt;head%26gt; %26lt;/head%26gt; tags
If you have to do it in php, then it would be like this:
echo "
%26lt;meta name=\"keywords\" content=\"seperate, your, keywords, with, commas.\"%26gt; \n
%26lt;meta name=\"description\" content=\"Add a description of your website here.\"%26gt;";
Reply:if you don't have access to the file that creates all of the tags between %26lt;head%26gt; and %26lt;/head%26gt; then you can't add meta tags. If you have access to that file, all you need to do is add %26lt;meta ...%26gt; inside the head tags. If your developer is having the functions that create the head tags just return a string you will need to use - ${string name}.= "%26lt;meta name=\"... %26gt; (replace the {string name} with the name of the string being returned and on both of these fill in the meta tags as needed).
How do I add meta and description in my php website?
http://www.w3schools.com/php/
http://websitetips.com/php/
Reply:You'll have to download the header.php file, add it there, then re-upload it.
These tags need to go in between the %26lt;head%26gt; %26lt;/head%26gt; tags
If you have to do it in php, then it would be like this:
echo "
%26lt;meta name=\"keywords\" content=\"seperate, your, keywords, with, commas.\"%26gt; \n
%26lt;meta name=\"description\" content=\"Add a description of your website here.\"%26gt;";
Reply:if you don't have access to the file that creates all of the tags between %26lt;head%26gt; and %26lt;/head%26gt; then you can't add meta tags. If you have access to that file, all you need to do is add %26lt;meta ...%26gt; inside the head tags. If your developer is having the functions that create the head tags just return a string you will need to use - ${string name}.= "%26lt;meta name=\"... %26gt; (replace the {string name} with the name of the string being returned and on both of these fill in the meta tags as needed).
How do I get free PHP-MySQL Scripts to set up an Online Banking website?
Please it's urgent, if you have any idea, just give me.
How do I get free PHP-MySQL Scripts to set up an Online Banking website?
First of all i have to inform you that if you dont have written permision from the bank about the website you will put yourself in great troubles!!!
It is easy to write the scripts by using php , and then wirte the appropriate sql commands at mysql. There is lot of great books that they can easily help you do that.You can also check at the official web pages of php and mysql to find lot of instruction,documentation and examples.
Now if you want the scripts ready, i dont think that it is possible to find them but you can check at www.hotscripts.com, www.mysql.com/articles/ddws/index.html or just through a search engine.
Allow me to tell you that the online banking scripts must correspond to your needs, it will be difficult to find the appropriate scripts by chcking in the internet.Have also in mind that is the script are not totally correct your webpage can easily fall on attackes like sql injection and many more.
I hope that i help.
Take care
How do I get free PHP-MySQL Scripts to set up an Online Banking website?
First of all i have to inform you that if you dont have written permision from the bank about the website you will put yourself in great troubles!!!
It is easy to write the scripts by using php , and then wirte the appropriate sql commands at mysql. There is lot of great books that they can easily help you do that.You can also check at the official web pages of php and mysql to find lot of instruction,documentation and examples.
Now if you want the scripts ready, i dont think that it is possible to find them but you can check at www.hotscripts.com, www.mysql.com/articles/ddws/index.html or just through a search engine.
Allow me to tell you that the online banking scripts must correspond to your needs, it will be difficult to find the appropriate scripts by chcking in the internet.Have also in mind that is the script are not totally correct your webpage can easily fall on attackes like sql injection and many more.
I hope that i help.
Take care
Would it be ok if i was to start my business website in php then go to coldfusion gradually?
Hello Everyone, I am starting an online advertising business so you know what I am talking about, so would it be safe, or good to go from PHP to ColdFusion but be a gradually process in changing thank you in advance.
Would it be ok if i was to start my business website in php then go to coldfusion gradually?
Why would you want to move from PHP to CF? I think you'd have a real difficult time gradually moving from one to the other. Trying to maintain 2 completely different code bases would be unpleasant at best. If you're going to build it in PHP, I'd stick with PHP.
Reply:You're best to start the way you mean to finish, it would be very confusing to move over gradually.
Why would you want to move from php to CF anyway?
Reply:i don't see anything wrong with staying PHP.
what features in CF you think is significantly better than php?
sepal
Would it be ok if i was to start my business website in php then go to coldfusion gradually?
Why would you want to move from PHP to CF? I think you'd have a real difficult time gradually moving from one to the other. Trying to maintain 2 completely different code bases would be unpleasant at best. If you're going to build it in PHP, I'd stick with PHP.
Reply:You're best to start the way you mean to finish, it would be very confusing to move over gradually.
Why would you want to move from php to CF anyway?
Reply:i don't see anything wrong with staying PHP.
what features in CF you think is significantly better than php?
sepal
How do you do html emails in a UTF8 character set using PHP? Does anyone have a fully worked example?
Eg, sending an html email containing both Chinese and Japanese characters.
How do you do html emails in a UTF8 character set using PHP? Does anyone have a fully worked example?
Hello,
Convert the text to HTML Entities.
This way it does not matter what character set you use.
The Chinese and Japanese characters will be dissplayed correctly in the rendered HTML. Paste the HTML Entities: in the source of the html file.
This works for emails sent to yahoo.com gmail and email clients.
Chinese original: 英吉利海峡诸岛
HTML Entities: 英吉利...
Japanese original: 英国全土から探す
HTML Entities: 英国全ࢶ...
to see what the HTML Entities: look like visit: http://www.greywyvern.com/code/php/utf8_...
Change to HTML Entities in the drop down box.
Reply:Try to use multipart/mixed header in php's email function. I think that could help with different coding in one email.
Good luck!
How do you do html emails in a UTF8 character set using PHP? Does anyone have a fully worked example?
Hello,
Convert the text to HTML Entities.
This way it does not matter what character set you use.
The Chinese and Japanese characters will be dissplayed correctly in the rendered HTML. Paste the HTML Entities: in the source of the html file.
This works for emails sent to yahoo.com gmail and email clients.
Chinese original: 英吉利海峡诸岛
HTML Entities: 英吉利...
Japanese original: 英国全土から探す
HTML Entities: 英国全ࢶ...
to see what the HTML Entities: look like visit: http://www.greywyvern.com/code/php/utf8_...
Change to HTML Entities in the drop down box.
Reply:Try to use multipart/mixed header in php's email function. I think that could help with different coding in one email.
Good luck!
Where do I find a free php script or software to create a online tutorial?
Where do I find a free php script or software to create a online tutorial
Where do I find a free php script or software to create a online tutorial?
Do you have an example of how you want this tutorial to function? there is Camtasia by www.techsmith.com that will help you create a demonstration using your own computer or there are some scripts at http://sourceforge.net/index.php
Reply:Try looking at http://php.resourceindex.com they have a lot of php scripts and software
Where do I find a free php script or software to create a online tutorial?
Do you have an example of how you want this tutorial to function? there is Camtasia by www.techsmith.com that will help you create a demonstration using your own computer or there are some scripts at http://sourceforge.net/index.php
Reply:Try looking at http://php.resourceindex.com they have a lot of php scripts and software
How do I write a php/mysql query to csv?
How do I write a php/mysql query to csv? Thanks.
How do I write a php/mysql query to csv?
Hi there, here is how you could do it:
%26lt;?php
// Next Line Builds the first row of the CSV
$output = "\"Name\",\"Phone\",\"Email\" \n";
/* NOTE: REMOVE the space before \n on the end of the line above
Somehow on the preview I see that If I post it without that space, Yahoo is formatting it therefore changing how it's suppose to be. I hope you understand.
*/
Calldb(); // This function connects to the database
// I'm assuming you know how to connect to the database
// Use your own function or mysql connector here
$sql_query = "SELECT name, phone, email FROM contacts";
$result = mysql_query($sql_query) or die("There was a problem with the Database");
$number_of_records = mysql_num_rows($result); // Get number of records found
if($number_of_records)
{
While($rows = mysql_fetch_row($result))
{
$name = Trim($rows[0]);
$phone = Trim($rows[1]);
$email = trim($rows[2]);
$output .= "\"$name\",\"$phone\",\"$email\" \n";
// Adds to CSV
/* NOTE: REMOVE the space before \n on the end of the line
Somehow on the preview I see that If I post it without that space, Yahoo is formatting it therefore changing how it's suppose to be. I hope you understand. Same thing!
*/
}
}
$csv_filename = "CSV_Filename.cvs";
// Now save $output to a file
// MAKE SURE THE DIRECTORY HAS chmod PERMISSIONS to Write
$fp = fopen($csv_filename,"w");
fwrite($fp, $output, strlen($output));
fclose($fp);
echo "%26lt;a href=\"$csv_filename\"%26gt;Link to CSV FILE%26lt;/a%26gt; (Right-click and choose Save Target As)%26lt;br%26gt;";
?%26gt;
I hope that's what you were looking for. As you can see, you can format the output to be whatever you want and then save it to a file.
Reply:are you wanting the output to be CSV from a select statement?
How do I write a php/mysql query to csv?
Hi there, here is how you could do it:
%26lt;?php
// Next Line Builds the first row of the CSV
$output = "\"Name\",\"Phone\",\"Email\" \n";
/* NOTE: REMOVE the space before \n on the end of the line above
Somehow on the preview I see that If I post it without that space, Yahoo is formatting it therefore changing how it's suppose to be. I hope you understand.
*/
Calldb(); // This function connects to the database
// I'm assuming you know how to connect to the database
// Use your own function or mysql connector here
$sql_query = "SELECT name, phone, email FROM contacts";
$result = mysql_query($sql_query) or die("There was a problem with the Database");
$number_of_records = mysql_num_rows($result); // Get number of records found
if($number_of_records)
{
While($rows = mysql_fetch_row($result))
{
$name = Trim($rows[0]);
$phone = Trim($rows[1]);
$email = trim($rows[2]);
$output .= "\"$name\",\"$phone\",\"$email\" \n";
// Adds to CSV
/* NOTE: REMOVE the space before \n on the end of the line
Somehow on the preview I see that If I post it without that space, Yahoo is formatting it therefore changing how it's suppose to be. I hope you understand. Same thing!
*/
}
}
$csv_filename = "CSV_Filename.cvs";
// Now save $output to a file
// MAKE SURE THE DIRECTORY HAS chmod PERMISSIONS to Write
$fp = fopen($csv_filename,"w");
fwrite($fp, $output, strlen($output));
fclose($fp);
echo "%26lt;a href=\"$csv_filename\"%26gt;Link to CSV FILE%26lt;/a%26gt; (Right-click and choose Save Target As)%26lt;br%26gt;";
?%26gt;
I hope that's what you were looking for. As you can see, you can format the output to be whatever you want and then save it to a file.
Reply:are you wanting the output to be CSV from a select statement?
Any good websites that teaches php programming?
I'm taking a php class, but my professor would rather talk about servers, networking and plesk instead of php codes. Do you know any websites that can give you information or tips on php? I really want to pass my class. I need to learn php, and my textbook doesn't explain very well!
Any good websites that teaches php programming?
Here's a few to check out:
http://www.php.net/tut.php
http://www.freewebmasterhelp.com/tutoria...
http://www.php-mysql-tutorial.com/
http://www.tizag.com/phpT/
Reply:The website that I've listed in my sources is the best online place to learn the basics of PHP. To learn the advanced stuff you just have to experiment with different functions.
Reply:I learned directly from the www.php.net function list samples
printable cards
Any good websites that teaches php programming?
Here's a few to check out:
http://www.php.net/tut.php
http://www.freewebmasterhelp.com/tutoria...
http://www.php-mysql-tutorial.com/
http://www.tizag.com/phpT/
Reply:The website that I've listed in my sources is the best online place to learn the basics of PHP. To learn the advanced stuff you just have to experiment with different functions.
Reply:I learned directly from the www.php.net function list samples
printable cards
How to strip/remove comments for 100 php files?
I am writing an application based on php. Can anyone guide me how to remove or strip comments for my entire application, which is about 100 php files?
Maybe any public utility or class. Or any low-cost or open-source IDE ?
How to strip/remove comments for 100 php files?
If you mean, you want to delete comment lines from the code, you can do that with a decent text editor.
Or, if you want to do it with a PHP page itself, you can simply use regular expressions to locate comments and remove them. Using eregi_replace, it would be:
eregi_replace( '(?:/\*[\w\W]*?\*/|//[^\n]*? $|\#[^\n]*?$ )', '', $input);
Reply:If you processes each file line by line it can be done.
%26lt;?php
if ($handle = opendir('./phpfiles')) {
while (false !== ($file = readdir($handle))) {
if ($file != "." %26amp;%26amp; $file != "..") {
// process file
$lines = file($_GET['file_name']);
$l=0;
// depending on type of comments used this may need to be adjusted
while($l%26lt;count($lines))
{
//process line
// This following is a rough idea of how this could be accomplished
// there are generally 3 types of comments in php
// double forward slashes, pound symbol and forward slash followed by
// an asterick, which also needs a closing asterick and forward slash
if(isNotAComment($lines[$l]))
{
if($outputfile=fopen(readdir('./output... "a"))
{ //open file for writing
fwrite($outputfile, $lines[$l]); //write to file
}
}
}
}
closedir($handle);
}
?%26gt;
Reply:use textpad. It's a great product where you can search and remove text of any sort or programming language. Textpad.com
Maybe any public utility or class. Or any low-cost or open-source IDE ?
How to strip/remove comments for 100 php files?
If you mean, you want to delete comment lines from the code, you can do that with a decent text editor.
Or, if you want to do it with a PHP page itself, you can simply use regular expressions to locate comments and remove them. Using eregi_replace, it would be:
eregi_replace( '(?:/\*[\w\W]*?\*/|//[^\n]*? $|\#[^\n]*?$ )', '', $input);
Reply:If you processes each file line by line it can be done.
%26lt;?php
if ($handle = opendir('./phpfiles')) {
while (false !== ($file = readdir($handle))) {
if ($file != "." %26amp;%26amp; $file != "..") {
// process file
$lines = file($_GET['file_name']);
$l=0;
// depending on type of comments used this may need to be adjusted
while($l%26lt;count($lines))
{
//process line
// This following is a rough idea of how this could be accomplished
// there are generally 3 types of comments in php
// double forward slashes, pound symbol and forward slash followed by
// an asterick, which also needs a closing asterick and forward slash
if(isNotAComment($lines[$l]))
{
if($outputfile=fopen(readdir('./output... "a"))
{ //open file for writing
fwrite($outputfile, $lines[$l]); //write to file
}
}
}
}
closedir($handle);
}
?%26gt;
Reply:use textpad. It's a great product where you can search and remove text of any sort or programming language. Textpad.com
Does anyone know php well so I can insert a real estate database?
I would need someone I can talk to so that I could figure this out. Iv'e been trying to learn this for a while and finally just have to ask for help. I keep trying different ways of inserting tables and all the rest but it's not working. Please if someone could take the time to help me I would greatly appreciate it.
Does anyone know php well so I can insert a real estate database?
email me at ryan@devsanctum.com.
Inserting data with PHP is easy.
Reply:Does anyone know php well so I can insert a real estate database?
If your referring to "MLS Listings" you can't unless you are a licensed broker or agent. If you are a licensed then you can get an API from whoever you are going to get the data from and parse the XML with PHP.
If you are not licensed then this information cannot be retrieved at all.
Does anyone know php well so I can insert a real estate database?
email me at ryan@devsanctum.com.
Inserting data with PHP is easy.
Reply:Does anyone know php well so I can insert a real estate database?
If your referring to "MLS Listings" you can't unless you are a licensed broker or agent. If you are a licensed then you can get an API from whoever you are going to get the data from and parse the XML with PHP.
If you are not licensed then this information cannot be retrieved at all.
What are the best versions of PHP, MYSQL to install punbb on Windows XP ?
I am trying to install punbb on my Windows XP, I have changed PHP (4.x, 5.x) and MYSQL(3.x, 4.x, 5.x) versions many times, but I can't pass installation step. When I submitted info from install.php, the error message said that the client does not support authentication protocol which was requested by the server. Who is experienced on this, pls give me a better way?
What are the best versions of PHP, MYSQL to install punbb on Windows XP ?
try using winlamp it work great on xp it hase apache2 php5 and mysql
Reply:punbb requries
A webserver (preferably Apache)
PHP 4.1.0 or later
MySQL 3.23.17 or later
OR
PostgreSQL 7.0 or later
OR SQLite
I suggest using MySQL 5.0.15 and PHP 5.1.
Your can download an eBook for free (from mysite) to see the installation instructions:
http://www.sharanamshah.com/MyEbooks/Ins...
http://www.sharanamshah.com/MyEbooks/Ins...
Reply:IBServer.
What are the best versions of PHP, MYSQL to install punbb on Windows XP ?
try using winlamp it work great on xp it hase apache2 php5 and mysql
Reply:punbb requries
A webserver (preferably Apache)
PHP 4.1.0 or later
MySQL 3.23.17 or later
OR
PostgreSQL 7.0 or later
OR SQLite
I suggest using MySQL 5.0.15 and PHP 5.1.
Your can download an eBook for free (from mysite) to see the installation instructions:
http://www.sharanamshah.com/MyEbooks/Ins...
http://www.sharanamshah.com/MyEbooks/Ins...
Reply:IBServer.
How hard is it to build a CMS with PHP/mysql?
I am learning both atm and so far its been very easy, anyways I am intending to build my own CMS and put it online for people to use. How long would it take me to build something like that?
How hard is it to build a CMS with PHP/mysql?
A CMS is more of a problem than a solution. It takes more knowledge to build a good site with CMS than it does to just build a good maintainable site using code.
Reply:Have you tried joomla, word press, drupal cms
Reply:a CMS without graphics is more of a problem then a solution.
Reply:CMS can get very complicated and the market is full of them including free PHP ones. Good luck.
love song lyrics
How hard is it to build a CMS with PHP/mysql?
A CMS is more of a problem than a solution. It takes more knowledge to build a good site with CMS than it does to just build a good maintainable site using code.
Reply:Have you tried joomla, word press, drupal cms
Reply:a CMS without graphics is more of a problem then a solution.
Reply:CMS can get very complicated and the market is full of them including free PHP ones. Good luck.
love song lyrics
Will we get good opportunities in php in future?
Means the scope of php and mysql as an employ..Is there oppotunities and good salary for php programmers now in bangalore?
Will we get good opportunities in php in future?
I would say there will always be good oportunities as long as you have the right skills.
Reply:It's one of the biggest languages on the internet so I am going to say yes.
Will we get good opportunities in php in future?
I would say there will always be good oportunities as long as you have the right skills.
Reply:It's one of the biggest languages on the internet so I am going to say yes.
Can I install PHP on my computer to view my local files with my browser?
I don't have a web server installed on my computer, as the site I'm desinging is hosted by a company. I am just learning PHP and would like to download and install it on Windows so I can view my local files to make sure I have everything right, instead of constantly uploading and viewing to make proper changes. Can this be done without installing a server? If not, what would I have to do (in simple terms- I'm learning, but still not very knowledgable about this stuff).
Can I install PHP on my computer to view my local files with my browser?
No, you'll need a server. WAMP is probably the easiest way to get going: http://www.wampserver.com/en/
Reply:dude, just goto a site that alredy has PHP..like my free forum uses that... www.myfreeforum.org or other sites like that. takeforum.com/ uses it too. Just look up on google FREE FORUM HOSTING PHP just look upo what was just ins caps and it should work dude...lol np
Reply:install wamp on your pc (installs php, apache server, phpmyadmin, mysql)
then go to your browser and type in localhost
then open the file you want
Reply:You really, really don’t want to try it without a webserver. There’s a command line version of PHP, but if you’re going to test your code, you want to do it in a server type situation.
Install Apache, then PHP. Google them, and get them from their sites. The install instructions are in the documentation files for each.
Reply:If you have windows xp pro, php can be setup with IIS.
Can I install PHP on my computer to view my local files with my browser?
No, you'll need a server. WAMP is probably the easiest way to get going: http://www.wampserver.com/en/
Reply:dude, just goto a site that alredy has PHP..like my free forum uses that... www.myfreeforum.org or other sites like that. takeforum.com/ uses it too. Just look up on google FREE FORUM HOSTING PHP just look upo what was just ins caps and it should work dude...lol np
Reply:install wamp on your pc (installs php, apache server, phpmyadmin, mysql)
then go to your browser and type in localhost
then open the file you want
Reply:You really, really don’t want to try it without a webserver. There’s a command line version of PHP, but if you’re going to test your code, you want to do it in a server type situation.
Install Apache, then PHP. Google them, and get them from their sites. The install instructions are in the documentation files for each.
Reply:If you have windows xp pro, php can be setup with IIS.
Install mp3 files on host monster mysql datebase so php retrieves it, sends it to flash?
I just joined host monster and i am trying to figure out how i am going to put mp3 files in the mysql database that host monster provides. After doing that i want to write a php code that retrieves the mp3 or music files and send it to flash. Can someone help out please.
Install mp3 files on host monster mysql datebase so php retrieves it, sends it to flash?
Hi,
the easiest solution would be to read the mp3 binary and then store it in a longtext/blob column in a database. I recommend having two tables where you store your information: first being just blobs with blob_id, blob_data, blob_timestamp and blob_active, second containg all the mp3 info such as artist, blob_id (important), file_size, if you're only dealing with with mp3s you shouldn't need file_size nor file_type (all can be retrieved by PHP when reading the file), timestamp never did any harm...
To retrieve it you perform a simple SELECT from both tables based on blob_id (such as 'SELECT b.blob_data, m.mp3_name, m.mp3_size FROM blobs as b, mp3s as m WHERE m.mp3_id = 'HOWEVER YOU PASS THE MP3_ID here (GET I SUPPOSE)' AND m.blob_id = b.blob_id) and using headers output the mp3 to browser either to download or play (attachment/inline).
This should give you enough information to be able to browse the internet for the rest, this simple is an outline of the approach I have been taking so far (and I store all sorts: office documents, images... actually I run a DMS (Document Management System))...
Give me a shout if you need more help,
good luck,
hoopyfrood
--------------------------------------...
Love your documents!
DocuView (http://docuview.co.uk/) - The best Web 2.0 document management system (DMS) - utilising the latest technology to help your company achieve ISO 9001 certification.
Install mp3 files on host monster mysql datebase so php retrieves it, sends it to flash?
Hi,
the easiest solution would be to read the mp3 binary and then store it in a longtext/blob column in a database. I recommend having two tables where you store your information: first being just blobs with blob_id, blob_data, blob_timestamp and blob_active, second containg all the mp3 info such as artist, blob_id (important), file_size, if you're only dealing with with mp3s you shouldn't need file_size nor file_type (all can be retrieved by PHP when reading the file), timestamp never did any harm...
To retrieve it you perform a simple SELECT from both tables based on blob_id (such as 'SELECT b.blob_data, m.mp3_name, m.mp3_size FROM blobs as b, mp3s as m WHERE m.mp3_id = 'HOWEVER YOU PASS THE MP3_ID here (GET I SUPPOSE)' AND m.blob_id = b.blob_id) and using headers output the mp3 to browser either to download or play (attachment/inline).
This should give you enough information to be able to browse the internet for the rest, this simple is an outline of the approach I have been taking so far (and I store all sorts: office documents, images... actually I run a DMS (Document Management System))...
Give me a shout if you need more help,
good luck,
hoopyfrood
--------------------------------------...
Love your documents!
DocuView (http://docuview.co.uk/) - The best Web 2.0 document management system (DMS) - utilising the latest technology to help your company achieve ISO 9001 certification.
In PHP and MySQL, how do I make Unicode characters work correctly?
I get some data from text files. A string comes like this:
"Garmin nüvi 350..."
Then I insert it into my table (which has already VARCHAR fields as uft8_general_ci) and this is what I get after:
"Garmin nüvi 350..."
Why doesn't it work correctly? What should I do?
In PHP and MySQL, how do I make Unicode characters work correctly?
%26lt;?php header("Content-Type: charset=UTF-8"); ?%26gt;
are you using the UTF-8 type?
greeting cards
"Garmin nüvi 350..."
Then I insert it into my table (which has already VARCHAR fields as uft8_general_ci) and this is what I get after:
"Garmin nüvi 350..."
Why doesn't it work correctly? What should I do?
In PHP and MySQL, how do I make Unicode characters work correctly?
%26lt;?php header("Content-Type: charset=UTF-8"); ?%26gt;
are you using the UTF-8 type?
greeting cards
What is the difference between the ASP and PHP programming languages?
ASP = Active Server Pages, an older Microsoft technology (1998) to embed a scripting language such as VBscript (or Perl or Jscript) in a page together with HTML tags, The script emits HTML. Not a programming language per se (VBscript would be a programming language supported by ASP)
Example: the VBscript text is between %26lt;% %%26gt;
%26lt;html%26gt;
%26lt;body%26gt;
%26lt;% a = "World" %%26gt;
%26lt;% response.write "Hello " %26amp; a %%26gt;%26lt;/body%26gt;
%26lt;/htmll%26gt;
PHP is a similar scripting language to make web pages. It is more modern than ASP and a bit better designed. PHP commands are between %26lt;? ?%26gt;
%26lt;?php
if ($a) {
?%26gt;
What is the difference between the ASP and PHP programming languages?
There is no special license involved. Even PHP has a license (GPL). All you need is a web server that has IIS. A hosting plan that supports PHP will cost the same as one that supports ASP.
Because ASP does not need any special setup and it is easy to learn, write and debug, it is very popular. Report It
Reply:ASP and PHP are both very similar languages that are used to create dynamic web sites/pages. The main difference between the two languages (besides syntax) is that PHP is an open-source, free language, while ASP is not. If you are using one of these languages you will need to use a web server that supports either PHP or ASP.
Example: the VBscript text is between %26lt;% %%26gt;
%26lt;html%26gt;
%26lt;body%26gt;
%26lt;% a = "World" %%26gt;
%26lt;% response.write "Hello " %26amp; a %%26gt;%26lt;/body%26gt;
%26lt;/htmll%26gt;
PHP is a similar scripting language to make web pages. It is more modern than ASP and a bit better designed. PHP commands are between %26lt;? ?%26gt;
%26lt;?php
if ($a) {
?%26gt;
What is the difference between the ASP and PHP programming languages?
There is no special license involved. Even PHP has a license (GPL). All you need is a web server that has IIS. A hosting plan that supports PHP will cost the same as one that supports ASP.
Because ASP does not need any special setup and it is easy to learn, write and debug, it is very popular. Report It
Reply:ASP and PHP are both very similar languages that are used to create dynamic web sites/pages. The main difference between the two languages (besides syntax) is that PHP is an open-source, free language, while ASP is not. If you are using one of these languages you will need to use a web server that supports either PHP or ASP.
What is the name of a vulnarable module in one of the older versions of PHP-nuke?
As far as i know its rarely used these days.
What is the name of a vulnarable module in one of the older versions of PHP-nuke?
Hmm, do you want to scan for old PHP-nuke installations and then exploit the vulnerability in the module? Or you've already found one and want to know how to craft a malicious server request?
If you want to be a 133+ hax0r, you have to find this stuff out for yourself.
What is the name of a vulnarable module in one of the older versions of PHP-nuke?
Hmm, do you want to scan for old PHP-nuke installations and then exploit the vulnerability in the module? Or you've already found one and want to know how to craft a malicious server request?
If you want to be a 133+ hax0r, you have to find this stuff out for yourself.
I am web developer and work in php, oracle, html, css. I would like to know if OCA certification can help me?
I am a web developer and I work in Php, HTML, CSS, Javascript and backend would be oracle, mysql.
I would like to improve my DB skills so i was thinking of taking OCA exam (1Z0-001 + 1Z0-147). I dont think I would be intending to be a DBA.
Please let me know if this can help me or is there any other option which I should think.
I am web developer and work in php, oracle, html, css. I would like to know if OCA certification can help me?
you are options are good...just go ahead with it
Getting certified in Oracle will be an added advantage. for certification resources, tutorials and sample questions , try here
Reply:Not to speak of becoming an OCA, even if you give a through study on the study materials (hopefully from Oracle University) of the said exams, your knowledge on Oracle Application development will be dramatically increased.
for PL/ SQL part you may line to download the e book "PL/SQL User's Guide and Reference" from the following link
http://download.oracle.com/docs/cd/B1050...
Also, you may download the files
http://www.oracle.com/education/download...
and
http://www.oracle.com/global/kr/download...
GOOD LUCK.
I would like to improve my DB skills so i was thinking of taking OCA exam (1Z0-001 + 1Z0-147). I dont think I would be intending to be a DBA.
Please let me know if this can help me or is there any other option which I should think.
I am web developer and work in php, oracle, html, css. I would like to know if OCA certification can help me?
you are options are good...just go ahead with it
Getting certified in Oracle will be an added advantage. for certification resources, tutorials and sample questions , try here
Reply:Not to speak of becoming an OCA, even if you give a through study on the study materials (hopefully from Oracle University) of the said exams, your knowledge on Oracle Application development will be dramatically increased.
for PL/ SQL part you may line to download the e book "PL/SQL User's Guide and Reference" from the following link
http://download.oracle.com/docs/cd/B1050...
Also, you may download the files
http://www.oracle.com/education/download...
and
http://www.oracle.com/global/kr/download...
GOOD LUCK.
Where can I find a collection of PHP components to use?
I am not very familiar with PHP but I need certain components for my website like a web based event calendar, wiki, and document manager.
Where can I find a collection of PHP components to use?
http://www.planet-source-code.com
Join for free and download tutorials and sample code.
flower arranging
Where can I find a collection of PHP components to use?
http://www.planet-source-code.com
Join for free and download tutorials and sample code.
flower arranging
Can I get a Website builder for PHP and MySQL?
I want a web builder similar to Microsoft Frontpage. I want to create a PHP based website. Can i get it?
Can I get a Website builder for PHP and MySQL?
Adobe (macromedia) Dreamweaver
Can I get a Website builder for PHP and MySQL?
Adobe (macromedia) Dreamweaver
NAIA airport Manila. Does the 750 Php terminal fee applies to children of all ages?
Does this fee applies to all ticketed passengers regardless of age? Thanks.
NAIA airport Manila. Does the 750 Php terminal fee applies to children of all ages?
Yes, it applies regardless of age.
Reply:All ticketed passenger regardless of age should pay this terminal fee.
Reply:It applies to all passengers except OFW's.
Reply:No kiddie-discount at the NAIA, those inconsiderate buttholes.
NAIA airport Manila. Does the 750 Php terminal fee applies to children of all ages?
Yes, it applies regardless of age.
Reply:All ticketed passenger regardless of age should pay this terminal fee.
Reply:It applies to all passengers except OFW's.
Reply:No kiddie-discount at the NAIA, those inconsiderate buttholes.
What's the best way to sort an array of dates in php?
I used sort($array, SORT_STRING) but the problem is that it doesn't preserve the keys.
What's the best way to sort an array of dates in php?
You could always implement your own sorting function, because you would know exactly what was done to the elements.
Selection sort or Insertion sort are easy to implement and the overhead is not large as long as the array isn't too big.
What's the best way to sort an array of dates in php?
You could always implement your own sorting function, because you would know exactly what was done to the elements.
Selection sort or Insertion sort are easy to implement and the overhead is not large as long as the array isn't too big.
I would like to sell an ebook I have written on my PHP website. How do I upload it and connect to Paypal?
The website has been put together by a website designer who describes it as a 'managed site'. I can do a certain amount myself and then have to go back to the website designer for more than ordinary changes.
I would like to sell an ebook I have written on my PHP website. How do I upload it and connect to Paypal?
To sell an ebook, first u add this ebook to shopping cart items. When someone buys this ebook, after successful payment send a download link to the buyers email-id.
Reply:First, convert your ebook into .RAR files...then upload it somewhere. There are a lot free filehosting out there..[After finish upload, save the GIVEn URL for the ebook]
Second, register paypal....
Last, use paypal merchant account..there...you will find additional option,
find something like "After successful payment, where the customer willbe brought to?"
fill in the URL of the ebook that you've uploaded...
DONE!!
Reply:use ebay and follow the instructions on there.
flower arrangement
I would like to sell an ebook I have written on my PHP website. How do I upload it and connect to Paypal?
To sell an ebook, first u add this ebook to shopping cart items. When someone buys this ebook, after successful payment send a download link to the buyers email-id.
Reply:First, convert your ebook into .RAR files...then upload it somewhere. There are a lot free filehosting out there..[After finish upload, save the GIVEn URL for the ebook]
Second, register paypal....
Last, use paypal merchant account..there...you will find additional option,
find something like "After successful payment, where the customer willbe brought to?"
fill in the URL of the ebook that you've uploaded...
DONE!!
Reply:use ebay and follow the instructions on there.
flower arrangement
How do I use PHP code in WordPress pages?
Hi all,
I have to code an orderform for a client, the site is built using WordPress. When I use PHP code, the code isn't executed but displayed as text in the page. I already turned off the Rich Text Editor because it changes the PHP open tag to an HTML comment but it still doesn't work. I'm not very familiar with WP. How do I use PHP code in static WP Pages so that it gets executed?
How do I use PHP code in WordPress pages?
Use the PHP Exec Plugin
http://priyadi.net/archives/2005/03/02/w...
I have to code an orderform for a client, the site is built using WordPress. When I use PHP code, the code isn't executed but displayed as text in the page. I already turned off the Rich Text Editor because it changes the PHP open tag to an HTML comment but it still doesn't work. I'm not very familiar with WP. How do I use PHP code in static WP Pages so that it gets executed?
How do I use PHP code in WordPress pages?
Use the PHP Exec Plugin
http://priyadi.net/archives/2005/03/02/w...
How can i program in php to show a box as a pop up in same window.?
I am thinking about pop ups that can seen on yahoo site. please help me. I think some times it can use layers to do this.
How can i program in php to show a box as a pop up in same window.?
%26lt;a href=""
onmouseover="var pop = document.getElementById('pop');
pop.style.display=''"
onmouseout="var pop = document.getElementById('pop');
pop.style.display='none'"
%26gt;Show/Hide%26lt;/a%26gt;
%26lt;div id="pop"
style="position:absolute;
top:100px;
left:200px;
display:none;
border:1px dotted black;
width:100px"%26gt;Hello%26lt;/div%26gt;
How can i program in php to show a box as a pop up in same window.?
%26lt;a href=""
onmouseover="var pop = document.getElementById('pop');
pop.style.display=''"
onmouseout="var pop = document.getElementById('pop');
pop.style.display='none'"
%26gt;Show/Hide%26lt;/a%26gt;
%26lt;div id="pop"
style="position:absolute;
top:100px;
left:200px;
display:none;
border:1px dotted black;
width:100px"%26gt;Hello%26lt;/div%26gt;
Friday, May 21, 2010
Instant alert or popup based on PHP and MySQL?
I am designing an intranet based website. I need a mechanism where when a new sales order is recorded in the sales department, the stores department automatically receives an alert (a pop-up, or a sound/beep of some sort). I am using PHP, and MySQL. The webserver is Apache. What I need is some sort of instant messaging service based on these tools. Any suggestions?
My research on the web has not yielded satisfactory results.
Instant alert or popup based on PHP and MySQL?
Hmm, in PHP/MySQL not that easy
I'd make a little popup, that is open on the stores department computer such as monitor.php
That PHP file checks for a new sale, if there is it echos/prints 'New sale' or whatever
This page also has a line of Javascript code to reload it every 10 seconds or whatever (plently of snippets around on net)
Reply:this is a good question,,
what i would do is build a page and using javascript get it to refresh at a set interval, then as the page reloads using php query the mysql database to see if a new record has been inserted if it has, you can then output a javascript alert to the loading page alerting the sales dept of a new sale.
but an easier way would be if they have mail software like outlook running, just set up a script / storred procedure to send an email for each new order, as with ouotlook it pops up a little box to let you know you have mail thus providing a visual alert.
My research on the web has not yielded satisfactory results.
Instant alert or popup based on PHP and MySQL?
Hmm, in PHP/MySQL not that easy
I'd make a little popup, that is open on the stores department computer such as monitor.php
That PHP file checks for a new sale, if there is it echos/prints 'New sale' or whatever
This page also has a line of Javascript code to reload it every 10 seconds or whatever (plently of snippets around on net)
Reply:this is a good question,,
what i would do is build a page and using javascript get it to refresh at a set interval, then as the page reloads using php query the mysql database to see if a new record has been inserted if it has, you can then output a javascript alert to the loading page alerting the sales dept of a new sale.
but an easier way would be if they have mail software like outlook running, just set up a script / storred procedure to send an email for each new order, as with ouotlook it pops up a little box to let you know you have mail thus providing a visual alert.
Is it possible to use PHP to get the dememsions of an image?
I've set up a PHP-based wallpaper gallery and some of the images are 600x800 in size and others are 1024x768. The pages are all dynamically generated, but it would be nice to show the user, before they click, what filesize the image is. Here's one example page:
http://www.mzanime.com/aw/naruto/
Currently it justs shows the name of the thumbnail, but thats not what I want it to show.
Is it possible to use PHP to get the dememsions of an image?
array getimagesize ( string filename [, array %26amp;imageinfo] )
It DOESN'T require the GD library. The array it returns consists of:
[0] = width
[1] = height
[2] = type flag:
1 = GIF
2 = JPG
3 = PNG
4 = SWF
5 = PSD
6 = BMP
7 = TIFF(intel byte order)
8 = TIFF(motorola byte order)
9 = JPC
10 = JP2
11 = JPX
12 = JB2
13 = SWC
14 = IFF
15 = WBMP
16 = XBM
[3] = HTML height and width tags
And there's other stuff. Check it out at http://www.php.net/
Reply:Absolutely!
If your service provider has the GD library installed (I'd be surprised if they didn't), you can use the getImageSize function. It is simple to use - the documentation can be found here...
http://ca3.php.net/manual/en/function.ge...
Good Luck!
eurovision song contest
http://www.mzanime.com/aw/naruto/
Currently it justs shows the name of the thumbnail, but thats not what I want it to show.
Is it possible to use PHP to get the dememsions of an image?
array getimagesize ( string filename [, array %26amp;imageinfo] )
It DOESN'T require the GD library. The array it returns consists of:
[0] = width
[1] = height
[2] = type flag:
1 = GIF
2 = JPG
3 = PNG
4 = SWF
5 = PSD
6 = BMP
7 = TIFF(intel byte order)
8 = TIFF(motorola byte order)
9 = JPC
10 = JP2
11 = JPX
12 = JB2
13 = SWC
14 = IFF
15 = WBMP
16 = XBM
[3] = HTML height and width tags
And there's other stuff. Check it out at http://www.php.net/
Reply:Absolutely!
If your service provider has the GD library installed (I'd be surprised if they didn't), you can use the getImageSize function. It is simple to use - the documentation can be found here...
http://ca3.php.net/manual/en/function.ge...
Good Luck!
eurovision song contest
What is the most efficient way to make a user database in PHP/MySQL.?
I'm making a website and need to allow users to log-in and store information. I only have access to one database, but I can make as many tables and fields as I need.
What sort of structure should I use to store the information? Do I have to use some "index" thing?
I know almost nothing about MYSQL, but I'm good at coding things I don't know. The PHP and the HTML forms is a cinch, I just need to know how to structure the files.
Thanks!
What is the most efficient way to make a user database in PHP/MySQL.?
Before you do anything you need to read a book on PHP sessions or cookies. After you do this you will know how to structure a database for multiple user accounts.
The idea is that you know who your visitor is by its unique session id and you make sure to inculde this in you WHERE clauses whenever you make a query to the database.
Good luck.
Reply:I know of a tool that i hope you'll make use of:
Easy PHP
http://www.easyphp.org
Reply:Try using PHPMyAdmin (http://phpmyadmin.net). It is a web-based editing script for MySQL databases, written in PHP. It'll allow you to visually setup your database.
What sort of structure should I use to store the information? Do I have to use some "index" thing?
I know almost nothing about MYSQL, but I'm good at coding things I don't know. The PHP and the HTML forms is a cinch, I just need to know how to structure the files.
Thanks!
What is the most efficient way to make a user database in PHP/MySQL.?
Before you do anything you need to read a book on PHP sessions or cookies. After you do this you will know how to structure a database for multiple user accounts.
The idea is that you know who your visitor is by its unique session id and you make sure to inculde this in you WHERE clauses whenever you make a query to the database.
Good luck.
Reply:I know of a tool that i hope you'll make use of:
Easy PHP
http://www.easyphp.org
Reply:Try using PHPMyAdmin (http://phpmyadmin.net). It is a web-based editing script for MySQL databases, written in PHP. It'll allow you to visually setup your database.
Whats a good program to write and publish php?
I am just learning web design basics. I have a website written in php and running on a SQL data base, and i need a program to download it and to re publish it as needed. I can use frontpage but i dont think it handles php well. Can I do this with frontpage or can u tell me another program to do this?
Whats a good program to write and publish php?
Most WYSIWYG editors do not handle PHP particularly well, though if you feel you must use such a tool, Dreamweaver is the only one that's any good.
I've found that Eclipse is very good. It has an FTP/SFTP plugin, and integrates well with PHP. Bonus: It's free! http://www.eclipse.org AND http://www.phpeclipse.net
Best of luck!
Reply:PHPEclipse or the Zend Editor are probably the most popular IDEs for PHP. However you can use any text editor. The IDEs just provide a lot of added functionality like code-hinting, snippets, debugging, etc.
http://www.eclipse.org
http://www.zend.com/
Reply:i would recomend Adobe-Macromedia's Dreamweaver suite over Frontpage, as dreamweaver is
a) the more profesional of the 2
b) handles more styles of coding easly
c) works very well with images created or edited in either Photoshop or fireworks
but im not sure of how well it handles PHP, as i havent had a chance to try it with PHP
Whats a good program to write and publish php?
Most WYSIWYG editors do not handle PHP particularly well, though if you feel you must use such a tool, Dreamweaver is the only one that's any good.
I've found that Eclipse is very good. It has an FTP/SFTP plugin, and integrates well with PHP. Bonus: It's free! http://www.eclipse.org AND http://www.phpeclipse.net
Best of luck!
Reply:PHPEclipse or the Zend Editor are probably the most popular IDEs for PHP. However you can use any text editor. The IDEs just provide a lot of added functionality like code-hinting, snippets, debugging, etc.
http://www.eclipse.org
http://www.zend.com/
Reply:i would recomend Adobe-Macromedia's Dreamweaver suite over Frontpage, as dreamweaver is
a) the more profesional of the 2
b) handles more styles of coding easly
c) works very well with images created or edited in either Photoshop or fireworks
but im not sure of how well it handles PHP, as i havent had a chance to try it with PHP
Where can I study PHP in Trivandrum with a live project?
I also need to study payment gateways, smarty tempate system, oScommerce, phpbb3 mods, apache mode re-writing, techniques of social networking, youtube clone development, paypal ipn, etc . I also need to study complex mysql query writing etc.
I like to see everything under one roof.
Where can I study PHP in Trivandrum with a live project?
Manchester Info Services is a best place to study everything in php
http://www.manchesterinfoservices.com/
Reply:May be you can contact a PHP expert. Check websites like http://askexpert.info/
I like to see everything under one roof.
Where can I study PHP in Trivandrum with a live project?
Manchester Info Services is a best place to study everything in php
http://www.manchesterinfoservices.com/
Reply:May be you can contact a PHP expert. Check websites like http://askexpert.info/
Does Ruby on Rails become more popular than PHP in next 5 years or it will be disappear very soon?
I have read and heard that Ruby on Rails is much better than PHP. It is easier and cleaner than PHP. Is it true? Could you please recommend me a good book or website that I can start learning Ruby on Rails.
Does Ruby on Rails become more popular than PHP in next 5 years or it will be disappear very soon?
Ruby on Rails is an off-the-shelf data-base, e-commerce and CMS system, based on PhP, written in PhP and designed for AMATEURS who do not know how to code.
You are asking if the "application" (Ruby) is going to replace the "code" (PhP)!
I wish ROR simply disappear, and let proper programmers do their job.
wedding song
Does Ruby on Rails become more popular than PHP in next 5 years or it will be disappear very soon?
Ruby on Rails is an off-the-shelf data-base, e-commerce and CMS system, based on PhP, written in PhP and designed for AMATEURS who do not know how to code.
You are asking if the "application" (Ruby) is going to replace the "code" (PhP)!
I wish ROR simply disappear, and let proper programmers do their job.
wedding song
How to build a "Contact Us" form in PHP that accepts JAPANESE TEXT?
I have no problems building a form that accepts and posts english to my web mail inbox.
Unforetunately it garbles Asian text characters.
Is there a way to write the PHP script that will take care of this?
I would rather not try to tinker with the php.ini file if possible because I`m not confident about such things.
How to build a "Contact Us" form in PHP that accepts JAPANESE TEXT?
Did you try to send it through POST method ?
An javascript that encode the original data to something like base64 is more complex but is assured to work.
Unforetunately it garbles Asian text characters.
Is there a way to write the PHP script that will take care of this?
I would rather not try to tinker with the php.ini file if possible because I`m not confident about such things.
How to build a "Contact Us" form in PHP that accepts JAPANESE TEXT?
Did you try to send it through POST method ?
An javascript that encode the original data to something like base64 is more complex but is assured to work.
Where can i download software which is helpfull to study PHP?
It 'd better to be free.
Where can i download software which is helpfull to study PHP?
Download xampp which installs a webserver, the php parser and mysql onto your HDD.
And then Notepad++ as an editor for your code.
Anything else you must learn by yourself.
Reply:Once you have downloaded the server programmes, do a web search for php manual. It is very comprehensive and easy to follow.
Reply:You can get eclipse and then download the PHP plugin. This will get you started.
The one I prefer is free for a while, they will give a trial for something like 20 days but the cost is very low $49.00 once you are ready to purchase It is called Komodo and has the functionality of multi hundred dollar systems. What is really nice is that it can be used for more than PHP go to www.activestate.com
Reply:as far as i know there is no such a thing!!
donwload wamp, PHP4 or 5, mysql and read the online lessons on databases and you will have a good start.
Where can i download software which is helpfull to study PHP?
Download xampp which installs a webserver, the php parser and mysql onto your HDD.
And then Notepad++ as an editor for your code.
Anything else you must learn by yourself.
Reply:Once you have downloaded the server programmes, do a web search for php manual. It is very comprehensive and easy to follow.
Reply:You can get eclipse and then download the PHP plugin. This will get you started.
The one I prefer is free for a while, they will give a trial for something like 20 days but the cost is very low $49.00 once you are ready to purchase It is called Komodo and has the functionality of multi hundred dollar systems. What is really nice is that it can be used for more than PHP go to www.activestate.com
Reply:as far as i know there is no such a thing!!
donwload wamp, PHP4 or 5, mysql and read the online lessons on databases and you will have a good start.
Is facebook based on php? How to learn building a website like that?
Is there any book or website teaching people making a website like Facebook? Can anyone explain how facebook is made? The author made it within a week, does he purely using php to do that within that week?
Is facebook based on php? How to learn building a website like that?
I can guarantee one thing: the author of Facebook did NOT have a final product from straight PHP in one week! Perhaps there was a simple working prototype, but there was not a finished site of that complexity!
A word of advice: if the first site you try to code in PHP is Facebook, then the total number of PHP sites you will successfully construct will be zero. Facebook is a VERY VERY VERY complex piece of software.
This is the process I took for learning PHP. Keep in mind, when I started with PHP I already had years of experience with UserLand Frontier's dynamic webserver and with Zope, so I had a running start.
First, you need to grasp the syntax of the language. If you don't have that solidly down, you obviously can't write anything. So build a regular HTML file and make sure it conforms to W3C standards (if there's an error, you can use a validator on the PHP output to find exactly where it is). In that page, have a number of elements: a passage of text including HTML formatting, a date display, an image and a form with a selection of input elements.
Copy the HTML file and change its extension to "template.php" and then, in another file called "index.php", try to write code that will dynamically construct the HTML in question for one element at a time. Then use %26lt;? php echo $whatever; ?%26gt; in the template file to output the values in the correct location.
Suppose you had this line in your HTML file:
%26lt;p%26gt;Today's date is %26lt;b%26gt;June 21, 2007%26lt;/b%26gt;.%26lt;/p%26gt;
In template.php, replace that line with
%26lt;p%26gt;Today's date is %26lt;b%26gt;%26lt;?php echo $todays_date; ?%26gt;%26lt;/b%26gt;.%26lt;/p%26gt;
Then make index.php like this:
%26lt;?php
$todays_date = 'June 21, 2007';
// create your other values here
require_once ('template.php');
?%26gt;
Now, obviously, tomorrow the date will be incorrect. So we need to generate the date string for the current time. Change the code to this:
%26lt;?php
$todays_date = 'June 21, 2007'; // static value
$todays_date = date('M j, Y'); // calculated value overrides
// create your other values here
require_once ('template.php');
?%26gt;
Note how I left the fake code in place and then replaced the value with the calculated one. When the calculation script is running correctly, you can delete the static placeholder. If the dynamic code does not work for some reason, comment it out and run the page again, and the plain text version will return to play.
You can follow the same basic pattern to develop more complex data. Just break the puzzle down into pieces and do each one individually. Remember the correct order for developing software:
1) Make it work.
2) Make it work CORRECTLY.
3) Make it work CORRECTLY and FAST.
Filing to follow this order will mean you are optimizing code that's not generating the right product, and that way lies the land of Unfinished Projects. :-)
Once you are comfortable in PHP — I would allow about a year of tinkering and reading stuff, assuming you work on it every day — then you'll be ready for more advanced projects (but still not Facebook). Once you understand the language well enough to build an automatic templating and navigation system for a PHP website (that generates the page code, including the menus, automatically from the content on eaqch page request), you're ready to move into content management systems. I recommend Drupal for PHP developers; it's a well designed and secure CMS framework. I have been using Drupal for about six weeks now developing a new socializing site. It's coming along nicely, and we're ahead of schedule for our July 7 launch.
Reply:u can create that type of sites using any programming languages like
java , php or asp
Reply:Facebook does appear to use PHP, although there is no way to be certain (since it is possible to set up a server to use URLs that include '.php' without using PHP).
Its nothing special in terms of web programming, so any (good) collection of books that teach HTML, CSS, a server side programming language, HTTP and maybe JavaScript will do the job.
The author might have got a basic implementation done within a week, but it has had a lot of work since then. The author wouldn't have used purely PHP - while that will handle the decision making processes, you also need a database to store the data, HTML to describe it, CSS to present it and HTTP to transport it to the client.
Is facebook based on php? How to learn building a website like that?
I can guarantee one thing: the author of Facebook did NOT have a final product from straight PHP in one week! Perhaps there was a simple working prototype, but there was not a finished site of that complexity!
A word of advice: if the first site you try to code in PHP is Facebook, then the total number of PHP sites you will successfully construct will be zero. Facebook is a VERY VERY VERY complex piece of software.
This is the process I took for learning PHP. Keep in mind, when I started with PHP I already had years of experience with UserLand Frontier's dynamic webserver and with Zope, so I had a running start.
First, you need to grasp the syntax of the language. If you don't have that solidly down, you obviously can't write anything. So build a regular HTML file and make sure it conforms to W3C standards (if there's an error, you can use a validator on the PHP output to find exactly where it is). In that page, have a number of elements: a passage of text including HTML formatting, a date display, an image and a form with a selection of input elements.
Copy the HTML file and change its extension to "template.php" and then, in another file called "index.php", try to write code that will dynamically construct the HTML in question for one element at a time. Then use %26lt;? php echo $whatever; ?%26gt; in the template file to output the values in the correct location.
Suppose you had this line in your HTML file:
%26lt;p%26gt;Today's date is %26lt;b%26gt;June 21, 2007%26lt;/b%26gt;.%26lt;/p%26gt;
In template.php, replace that line with
%26lt;p%26gt;Today's date is %26lt;b%26gt;%26lt;?php echo $todays_date; ?%26gt;%26lt;/b%26gt;.%26lt;/p%26gt;
Then make index.php like this:
%26lt;?php
$todays_date = 'June 21, 2007';
// create your other values here
require_once ('template.php');
?%26gt;
Now, obviously, tomorrow the date will be incorrect. So we need to generate the date string for the current time. Change the code to this:
%26lt;?php
$todays_date = 'June 21, 2007'; // static value
$todays_date = date('M j, Y'); // calculated value overrides
// create your other values here
require_once ('template.php');
?%26gt;
Note how I left the fake code in place and then replaced the value with the calculated one. When the calculation script is running correctly, you can delete the static placeholder. If the dynamic code does not work for some reason, comment it out and run the page again, and the plain text version will return to play.
You can follow the same basic pattern to develop more complex data. Just break the puzzle down into pieces and do each one individually. Remember the correct order for developing software:
1) Make it work.
2) Make it work CORRECTLY.
3) Make it work CORRECTLY and FAST.
Filing to follow this order will mean you are optimizing code that's not generating the right product, and that way lies the land of Unfinished Projects. :-)
Once you are comfortable in PHP — I would allow about a year of tinkering and reading stuff, assuming you work on it every day — then you'll be ready for more advanced projects (but still not Facebook). Once you understand the language well enough to build an automatic templating and navigation system for a PHP website (that generates the page code, including the menus, automatically from the content on eaqch page request), you're ready to move into content management systems. I recommend Drupal for PHP developers; it's a well designed and secure CMS framework. I have been using Drupal for about six weeks now developing a new socializing site. It's coming along nicely, and we're ahead of schedule for our July 7 launch.
Reply:u can create that type of sites using any programming languages like
java , php or asp
Reply:Facebook does appear to use PHP, although there is no way to be certain (since it is possible to set up a server to use URLs that include '.php' without using PHP).
Its nothing special in terms of web programming, so any (good) collection of books that teach HTML, CSS, a server side programming language, HTTP and maybe JavaScript will do the job.
The author might have got a basic implementation done within a week, but it has had a lot of work since then. The author wouldn't have used purely PHP - while that will handle the decision making processes, you also need a database to store the data, HTML to describe it, CSS to present it and HTTP to transport it to the client.
How do you get images to upload from phpmyadmin using php?
phpmyadmin is only for a mysql database, and is not a cms.
MySQL is a database, not a file server.
--Sorry.
stamen
MySQL is a database, not a file server.
--Sorry.
stamen
What is code for auto generated mail in php programming?how to write code for this?
what is code for auto generated mail in php programming?
how to write code for this?
What is code for auto generated mail in php programming?how to write code for this?
http://uk.php.net/manual/en/function.mai...
Reply:I wrote up a PHP script to do this, it is really not too difficult.
http://email.about.com/cs/phpemailtips/q...
There is a tutorial, hope that helps.
Reply:what event do you want to trigger an email....give me more detail and i can give you the required code in just a few minutes I expect
how to write code for this?
What is code for auto generated mail in php programming?how to write code for this?
http://uk.php.net/manual/en/function.mai...
Reply:I wrote up a PHP script to do this, it is really not too difficult.
http://email.about.com/cs/phpemailtips/q...
There is a tutorial, hope that helps.
Reply:what event do you want to trigger an email....give me more detail and i can give you the required code in just a few minutes I expect
How can I make a comment system for my website without PHP?
Here's what my layout looks like: http://scribbleartinc.bravehost.com/gall...
I want people to be able to comment on art that'll be posted there. However I can't use a PHP page because PHP hosting costs alot of money.
How can I make a comment system for my website without PHP?
Sounds like it is time to set up your own server instead of paying for hosting, it is really quite simple and inexpensive to do.
IM me and I will give you a good kick start!
Reply:PHP hosting cost's alot? if you think $5/month basic hosting is alot your crazy, thats dirt cheap might want to try http://www.godaddy.com
or yahoo hosting..
I want people to be able to comment on art that'll be posted there. However I can't use a PHP page because PHP hosting costs alot of money.
How can I make a comment system for my website without PHP?
Sounds like it is time to set up your own server instead of paying for hosting, it is really quite simple and inexpensive to do.
IM me and I will give you a good kick start!
Reply:PHP hosting cost's alot? if you think $5/month basic hosting is alot your crazy, thats dirt cheap might want to try http://www.godaddy.com
or yahoo hosting..
I have completely learned Redhat Linux and PHP,what type of job is applicable to me?
please tell your views.
I have completely learned Redhat Linux and PHP,what type of job is applicable to me?
From my own experience I can tell you that unless you have valid work experience or certifications to back that learning up, you are not likely to get any job. If you lack experience, fork out the money for some certifications. Also expect that with only certifications to back your knowledge up on a resume, you're likely to get a lower level job, expect something entry level. Don't expect to be the lead system administrator for a large software company right away.
With linux, if you know BASH and you know security then you can look for jobs doing system or server administration. If Apache is included in what you know then you can possibly get a job as a web developer.
What you might do is take the key words for the things you know and do a search for them on Yahoo HotJobs or CareerBuilder.com or other such site, that should give you a good idea of what jobs require those skills and what other skills you might need for those jobs.
Reply:like the first guy said but idk wat u mean lol sry
Reply:web design
I have completely learned Redhat Linux and PHP,what type of job is applicable to me?
From my own experience I can tell you that unless you have valid work experience or certifications to back that learning up, you are not likely to get any job. If you lack experience, fork out the money for some certifications. Also expect that with only certifications to back your knowledge up on a resume, you're likely to get a lower level job, expect something entry level. Don't expect to be the lead system administrator for a large software company right away.
With linux, if you know BASH and you know security then you can look for jobs doing system or server administration. If Apache is included in what you know then you can possibly get a job as a web developer.
What you might do is take the key words for the things you know and do a search for them on Yahoo HotJobs or CareerBuilder.com or other such site, that should give you a good idea of what jobs require those skills and what other skills you might need for those jobs.
Reply:like the first guy said but idk wat u mean lol sry
Reply:web design
PHP..how can I count how many characters are in a word in a paragraph excluding whitespace?
I want to be able to count how many characters are in a word excluding whitespace.
PHP..how can I count how many characters are in a word in a paragraph excluding whitespace?
Remove whitespace and count the length of the resulting string:
$text = "The quick brown fox";
$non_space = preg_replace("/\s+/", "", $text);
$char_count = strlen($non_space);
sim cards
PHP..how can I count how many characters are in a word in a paragraph excluding whitespace?
Remove whitespace and count the length of the resulting string:
$text = "The quick brown fox";
$non_space = preg_replace("/\s+/", "", $text);
$char_count = strlen($non_space);
sim cards
How can I add a prefix to a php variable but only if it isn't already there?
I have a table in my database where I let people put their website. I read from the table and created an href off what they entered. If they enter it wrong I don't feel bad. But some people put http:// and some don't. Using php how can I say add http:// to the start of $my_website as long as its not there already?
dan
How can I add a prefix to a php variable but only if it isn't already there?
I'm not fluent in php so I'm assuming you will know the translation, you want to use an IndexOf function. .
if(my_website.IndexOf("http://") %26lt; 0 )
my_website = "http://"+my_website
alternatively you could use a RegEx expression, though again, the language barrier blocks me ;) I'm sure there's example code for it out there somewhere though.
Reply:Look, I'm not an expert in php, but I think I know the solution to your problem, there is a function in php called "substr"
you give this function a string and it cuts it as needed
for example:
substr(Hello, 1, 2) returns "el" . The first number indicates the letter to start the cutting after, the second number indicates the length of the cutting
substr(Hello, 2, 2) gives "ll"
substr(Hello, 1, 3) gives "ell"
substr(Hello, 0, 4) gives "Hell"
Now If we use this function in a combination with an If conditional, this should do the work, here is the code u should add:
if (substr($my_website, 0, 4) != http)
$my_website="http://" . $my_website
Notice the dot, it adds strings.
change this code to suite you as much as you like.
dan
How can I add a prefix to a php variable but only if it isn't already there?
I'm not fluent in php so I'm assuming you will know the translation, you want to use an IndexOf function. .
if(my_website.IndexOf("http://") %26lt; 0 )
my_website = "http://"+my_website
alternatively you could use a RegEx expression, though again, the language barrier blocks me ;) I'm sure there's example code for it out there somewhere though.
Reply:Look, I'm not an expert in php, but I think I know the solution to your problem, there is a function in php called "substr"
you give this function a string and it cuts it as needed
for example:
substr(Hello, 1, 2) returns "el" . The first number indicates the letter to start the cutting after, the second number indicates the length of the cutting
substr(Hello, 2, 2) gives "ll"
substr(Hello, 1, 3) gives "ell"
substr(Hello, 0, 4) gives "Hell"
Now If we use this function in a combination with an If conditional, this should do the work, here is the code u should add:
if (substr($my_website, 0, 4) != http)
$my_website="http://" . $my_website
Notice the dot, it adds strings.
change this code to suite you as much as you like.
How do you create a true/false PHP quiz?
I need to create a quiz using PHP that has one question per page that is of the T/F format. The quiz needs to loop back in on itself (so when you get to question 10, you are given question 1 again). Any resources that would help? I'm talking specific resources - not "Look through this website, they might have something there". Thanks!
How do you create a true/false PHP quiz?
Hello, I will try to explain a better way to construct this. I have done the same thing in C#.NET but the theory still is the same for this specific question.
We have to first construct a database to store the quiz questions and the users answers:
* A quiz will have a QUIZ table {"id,name, creationdate"} Where "id", is the id of the quiz such as quiz 1, quiz 2, quiz 3. The name and creationdate are self explanatory.
* A quiz will have QUIZ_QUESTIONS table {"id,quiz_id,name,answer} where the"id" is the current question identifier , and quiz_id is the quiz where that question is refering to that references QUIZ , and name is "what the question is" , and answer would be if the question is 'T' or 'F'
Basically that is a very simple quiz dataapp to add stuff to the database we could do ... To add a new Quiz to database, we do the following:
INSERT INTO quiz VALUES ( 1 , "Bush Trivia", "9/28/2007" )
Now to add Questions to that quiz, you can do the following:
INSERT INTO quiz_questions VALUES ( 1, 1, "Is Bush president of USA", 'Y')
INSERT INTO quiz_questions VALUES ( 2, 1, "Is Bush a girl", 'N')
INSERT INTO quiz_questions VALUES ( 3, 1, "Is Bush dead", 'Y')
So the more questions you add in that table that refers to QUESTION 1 from 2nd column, is the questions for that quiz!
Now that your mini quiz db is setup (note you can extend that table to many tables to make it more general, but for the sake of simplicity, I just did 2 tables which is relevant for this purpose) it is time to do a QUIZ in PHP.
So let us make a file index.php that asks the user to select a quiz from a list, so the user wants to select "Bush Trivia", the user selects the link which is http://www.mysite.com / index.php?quiz=1 Where we introduced a $_GET parameter for the current QUIZ identification number..
NOTE* I am just doing this in a procedural matter, I recommend to do this in an object oriented way
%26lt;?php
if ( isset ( $_GET['quiz'] ) ) {
// Show the QUIIZ
showQuiz($_GET['quiz] );
}
else {
// Print out the list of quiz questions in a link format
}
?%26gt;
Now in ShowQuiz, you have to Gather all the questions, one by one. What you want to do is make the questions hidden from the user so he can't access it next time.. So you must create a SESSION before starting the quiz... and register a sesion that that user has started the quiz.
Now we have a list of all question names in the quiz, I would save that in to a session, so our session manager will contain.
%26lt;?php
session_start();
$_SESSION['quiz'] = the quiz id
$_SESSION['quiz_question'] = the array of quiz questions from the sql query
$_SESSION['quiz_current_id'] = the current id of the question displayed in user so we acan keep track which one is current..
. . .
. . .
?%26gt;
The session should be created once we select on the quiz we decide to do .
in showQuiz( $quiz ) we do a SQL query to the database:
SELECT question.name FROM quiz q JOIN quiz_questiosn qq ON q.id = qq.quiz_id WHERE qq.quiz_id = $quiz
Then we have to manage session variables, so that, you check what the current quiz id and you do But we have to check if we selected NEXT QUESTION button
So when the user selects the NEXT Question button, the POST request will go again, and you have to check if they checked the next button by doing then, you can continue what we said above
%26lt;?php
. . .
. . .
if (isset($_POST['nextButton'] ) {
$_SESSION['quiz_current_id']++;
}
$quizquestion = $_SESSION['quiz_questiosn']
if($_SESSION['quiz_current_id'] %26gt;= arraysize($quizquestion))
{
$_SESSION['quiz_current_id'] = 0; // We go back to the first question
}
ShowQuestionOnScreen($quiz,$_SESSION['...
. . .
. . .
?%26gt;
And in the Show QuestionOnScreen, you can just make a query to the database to grab the contents for that question and print them in the screen. So when the user selects NEXT, it checks if that quiz_queston_id in the session is the last quiz question, and if it is, it will modify it to be the first question so you can manage it. Once you managed that question, you can just print it to the screen.
This is just a BASIC QUIZ app, personally, I wouldn't do it that way. I would use Object Oriented Design to setup the clases, I will use Command Pattern to deal witht he set of Commands so each Command Action is its own Class, to make it easier for me to understand. I will use a more general Database Schema where I will have many tables which will make it larger but more extensible and efficient. I would use a templating systm where I will not mix PHP CODE and HTML, such as Smarty, or just make my own. Basically,I would use the same techniques as I shown above, but I will separate the logic into many classes and make it easier to visualize in a code perspective.
I hope that helped.. Good Luck
Reply:That sort of program sounds pretty easy, assuming, however, that you already know a fair bit of PHP. I highly doubt that there will be any sites saying exactly how to make a script like that, however (even though you said you did not want it) w3school.com has some great tutorials/references. A few ideas to get you started:
-Store the current question Id in a GET variable, so the URL might look like: http://your.site.com/quiz.php?qid=2
-Store the questions, and their answers in an array(s).
-A simple if statement could be used to loop your code. something like:
if($id%26gt;=10) $id=0;
How do you create a true/false PHP quiz?
Hello, I will try to explain a better way to construct this. I have done the same thing in C#.NET but the theory still is the same for this specific question.
We have to first construct a database to store the quiz questions and the users answers:
* A quiz will have a QUIZ table {"id,name, creationdate"} Where "id", is the id of the quiz such as quiz 1, quiz 2, quiz 3. The name and creationdate are self explanatory.
* A quiz will have QUIZ_QUESTIONS table {"id,quiz_id,name,answer} where the"id" is the current question identifier , and quiz_id is the quiz where that question is refering to that references QUIZ , and name is "what the question is" , and answer would be if the question is 'T' or 'F'
Basically that is a very simple quiz dataapp to add stuff to the database we could do ... To add a new Quiz to database, we do the following:
INSERT INTO quiz VALUES ( 1 , "Bush Trivia", "9/28/2007" )
Now to add Questions to that quiz, you can do the following:
INSERT INTO quiz_questions VALUES ( 1, 1, "Is Bush president of USA", 'Y')
INSERT INTO quiz_questions VALUES ( 2, 1, "Is Bush a girl", 'N')
INSERT INTO quiz_questions VALUES ( 3, 1, "Is Bush dead", 'Y')
So the more questions you add in that table that refers to QUESTION 1 from 2nd column, is the questions for that quiz!
Now that your mini quiz db is setup (note you can extend that table to many tables to make it more general, but for the sake of simplicity, I just did 2 tables which is relevant for this purpose) it is time to do a QUIZ in PHP.
So let us make a file index.php that asks the user to select a quiz from a list, so the user wants to select "Bush Trivia", the user selects the link which is http://www.mysite.com / index.php?quiz=1 Where we introduced a $_GET parameter for the current QUIZ identification number..
NOTE* I am just doing this in a procedural matter, I recommend to do this in an object oriented way
%26lt;?php
if ( isset ( $_GET['quiz'] ) ) {
// Show the QUIIZ
showQuiz($_GET['quiz] );
}
else {
// Print out the list of quiz questions in a link format
}
?%26gt;
Now in ShowQuiz, you have to Gather all the questions, one by one. What you want to do is make the questions hidden from the user so he can't access it next time.. So you must create a SESSION before starting the quiz... and register a sesion that that user has started the quiz.
Now we have a list of all question names in the quiz, I would save that in to a session, so our session manager will contain.
%26lt;?php
session_start();
$_SESSION['quiz'] = the quiz id
$_SESSION['quiz_question'] = the array of quiz questions from the sql query
$_SESSION['quiz_current_id'] = the current id of the question displayed in user so we acan keep track which one is current..
. . .
. . .
?%26gt;
The session should be created once we select on the quiz we decide to do .
in showQuiz( $quiz ) we do a SQL query to the database:
SELECT question.name FROM quiz q JOIN quiz_questiosn qq ON q.id = qq.quiz_id WHERE qq.quiz_id = $quiz
Then we have to manage session variables, so that, you check what the current quiz id and you do But we have to check if we selected NEXT QUESTION button
So when the user selects the NEXT Question button, the POST request will go again, and you have to check if they checked the next button by doing then, you can continue what we said above
%26lt;?php
. . .
. . .
if (isset($_POST['nextButton'] ) {
$_SESSION['quiz_current_id']++;
}
$quizquestion = $_SESSION['quiz_questiosn']
if($_SESSION['quiz_current_id'] %26gt;= arraysize($quizquestion))
{
$_SESSION['quiz_current_id'] = 0; // We go back to the first question
}
ShowQuestionOnScreen($quiz,$_SESSION['...
. . .
. . .
?%26gt;
And in the Show QuestionOnScreen, you can just make a query to the database to grab the contents for that question and print them in the screen. So when the user selects NEXT, it checks if that quiz_queston_id in the session is the last quiz question, and if it is, it will modify it to be the first question so you can manage it. Once you managed that question, you can just print it to the screen.
This is just a BASIC QUIZ app, personally, I wouldn't do it that way. I would use Object Oriented Design to setup the clases, I will use Command Pattern to deal witht he set of Commands so each Command Action is its own Class, to make it easier for me to understand. I will use a more general Database Schema where I will have many tables which will make it larger but more extensible and efficient. I would use a templating systm where I will not mix PHP CODE and HTML, such as Smarty, or just make my own. Basically,I would use the same techniques as I shown above, but I will separate the logic into many classes and make it easier to visualize in a code perspective.
I hope that helped.. Good Luck
Reply:That sort of program sounds pretty easy, assuming, however, that you already know a fair bit of PHP. I highly doubt that there will be any sites saying exactly how to make a script like that, however (even though you said you did not want it) w3school.com has some great tutorials/references. A few ideas to get you started:
-Store the current question Id in a GET variable, so the URL might look like: http://your.site.com/quiz.php?qid=2
-Store the questions, and their answers in an array(s).
-A simple if statement could be used to loop your code. something like:
if($id%26gt;=10) $id=0;
What specific things should I master in PHP to be able to do this??
I want to make complex e-commerce websites, Internet based applications using PHP and MySQL. Plz tell me which topics or chapters should I go through ...
What specific things should I master in PHP to be able to do this??
You'll need to learn a fair bit, but I would suggest going to http://w3schools.com/php/ to learn as much as you can.
Reply:visit www.programmersheaven.com you will find lot here
What specific things should I master in PHP to be able to do this??
You'll need to learn a fair bit, but I would suggest going to http://w3schools.com/php/ to learn as much as you can.
Reply:visit www.programmersheaven.com you will find lot here
How to use Google Analytics in a PHP file?
I know how to do this in an html file but the page I need to place it on is a PHP file. I am lost here somebody help
How to use Google Analytics in a PHP file?
A php file can be the same as an html file.
The php code is between %26lt;? and ?%26gt; marks. If you put the google code after the ?%26gt; mark, it will be interpreted as normal html, and the javascript will work.
garden ridge
How to use Google Analytics in a PHP file?
A php file can be the same as an html file.
The php code is between %26lt;? and ?%26gt; marks. If you put the google code after the ?%26gt; mark, it will be interpreted as normal html, and the javascript will work.
garden ridge
What are my chances to find a job after learning PHP/MySQL for 6 months?
I am 47 and I only know some html. Planning to change career and learning PHP/MySQL for about 6 months. What are my chance to get a job after that? Is PHP/MySQL the right technology? I was trying to do some ASP.NET but I was told it will take me much longer than 6 months.
What are my chances to find a job after learning PHP/MySQL for 6 months?
One *very* important thing you didn't add in was *where you are* - the market for PHP jockeys will be a lot different in Boston and rural Idaho.....
Reply:Shouldn't be a problem... Wal*Mart is always hiring people greeters.
Reply:PHP/MySQL isn't much, I've learned it in a month and I'm only 13. The maximum I've seen for a PHP/MySQL coder go for is $12/hr. If I was you I would learn VB6 and start programming real programs.
What are my chances to find a job after learning PHP/MySQL for 6 months?
One *very* important thing you didn't add in was *where you are* - the market for PHP jockeys will be a lot different in Boston and rural Idaho.....
Reply:Shouldn't be a problem... Wal*Mart is always hiring people greeters.
Reply:PHP/MySQL isn't much, I've learned it in a month and I'm only 13. The maximum I've seen for a PHP/MySQL coder go for is $12/hr. If I was you I would learn VB6 and start programming real programs.
Where can I find a free php script for a betting system?
I am trying to make a poker game online but I can't get the betting to work properly any suggestions?
Where can I find a free php script for a betting system?
try in www.hotscripts.com
Where can I find a free php script for a betting system?
try in www.hotscripts.com
How do you count the number of characters in a variable in PHP?
$x = strlen($string);
How do you count the number of characters in a variable in PHP?
The function is strnlen syntax is strlen($stringVar);
How do you count the number of characters in a variable in PHP?
The function is strnlen syntax is strlen($stringVar);
What is the difference between error handling and exception handling in PHP? please explain with an example?
Also please provide the situation in which we handle them.
What is the difference between error handling and exception handling in PHP? please explain with an example?
error handling is accommodating a bug in the program, crash of the link, full disk when writing, etc.
exception handling is business logic "I'm a male, I've given birth to 3 kids".
Sorry, - I don't work with PHP.
I may stand corrected. here's a link for "exception Handling"
http://en.wikipedia.org/wiki/Exception_h...
Reply:I believe the answer is the opposite of the previous poster. Exceptions are something that can not be handled by your code, in PHP you would see something like "%26lt;condition%26gt; or die()"
An error is typically data entry type problems, as in "user error" that can be reacted to and responded to by the code.
flowers for algernon
What is the difference between error handling and exception handling in PHP? please explain with an example?
error handling is accommodating a bug in the program, crash of the link, full disk when writing, etc.
exception handling is business logic "I'm a male, I've given birth to 3 kids".
Sorry, - I don't work with PHP.
I may stand corrected. here's a link for "exception Handling"
http://en.wikipedia.org/wiki/Exception_h...
Reply:I believe the answer is the opposite of the previous poster. Exceptions are something that can not be handled by your code, in PHP you would see something like "%26lt;condition%26gt; or die()"
An error is typically data entry type problems, as in "user error" that can be reacted to and responded to by the code.
flowers for algernon
PHP: How do you format information being stored in a database as paragraphs?
I'm creating a blog site in PHP. Users can enter a title for their blog in a textbox, and the body of their blog in a textarea box.
I'm storing the body of their blog in a PHP database as a varchar type.
When I retrieve the body of a blog from the database and output it to the screen, will the blog lose all formatting (e.g. paragraph breaks, indents, etc.)? If so, how can I preserve the formatting?
PHP: How do you format information being stored in a database as paragraphs?
You can use a series of str_replace to do what you want.
Assume that the variable containing the text you want to format is named $body.
To replace line breaks with HTML line breaks:
$body = str_replace("\n", "
", $body);
To replace tabs with non-breaking spaces, just use the non-breaking space entity (which Yahoo won't reproduce properly; it's %26amp; nbsp; without the space, represented below with just nbsp;
$body = str_replace("\t", "nbsp;nbsp;nbsp;nbsp;", $body);
In all honesty, rather than reprogramming the wheel, I'd suggest using WordPress or Blogger.
http://us3.php.net/manual/en/function.st...
Reply:If you want to save formatted text, then you can enter your data from a web editor and save your data in HTML format in a filed of type TEXT.
This will cause issues when searching text. So I suggest you have two fields in your table. Into one you insert HTML formatted text, and in the other you save raw text. You use the one with raw text for search purposes.
Thank You
Reply:You can include a rich text editor into your application, so that users can create their own HTML. Take a look at a few of those:
http://tinymce.moxiecode.com/
http://xinha.python-hosting.com/
http://koivi.com/WYSIWYG-Editor/
Alternatively, you can use nl2br() function to replace line breaks with %26lt;br%26gt; tags:
http://www.php.net/nl2br
__________
Reply:Put it in a %26lt;pre%26gt; tag.
Reply:Try storing the content as text or tinytext. Varchar does not notice paragraphs.
If you need more help, contact me at http://www.yuchniuk.com
I'm storing the body of their blog in a PHP database as a varchar type.
When I retrieve the body of a blog from the database and output it to the screen, will the blog lose all formatting (e.g. paragraph breaks, indents, etc.)? If so, how can I preserve the formatting?
PHP: How do you format information being stored in a database as paragraphs?
You can use a series of str_replace to do what you want.
Assume that the variable containing the text you want to format is named $body.
To replace line breaks with HTML line breaks:
$body = str_replace("\n", "
", $body);
To replace tabs with non-breaking spaces, just use the non-breaking space entity (which Yahoo won't reproduce properly; it's %26amp; nbsp; without the space, represented below with just nbsp;
$body = str_replace("\t", "nbsp;nbsp;nbsp;nbsp;", $body);
In all honesty, rather than reprogramming the wheel, I'd suggest using WordPress or Blogger.
http://us3.php.net/manual/en/function.st...
Reply:If you want to save formatted text, then you can enter your data from a web editor and save your data in HTML format in a filed of type TEXT.
This will cause issues when searching text. So I suggest you have two fields in your table. Into one you insert HTML formatted text, and in the other you save raw text. You use the one with raw text for search purposes.
Thank You
Reply:You can include a rich text editor into your application, so that users can create their own HTML. Take a look at a few of those:
http://tinymce.moxiecode.com/
http://xinha.python-hosting.com/
http://koivi.com/WYSIWYG-Editor/
Alternatively, you can use nl2br() function to replace line breaks with %26lt;br%26gt; tags:
http://www.php.net/nl2br
__________
Reply:Put it in a %26lt;pre%26gt; tag.
Reply:Try storing the content as text or tinytext. Varchar does not notice paragraphs.
If you need more help, contact me at http://www.yuchniuk.com
How do I link PHP to Mysql Server and how do I upload Php. How do I create forms in PHP using Msql as Database
Im trying to create a website but I have to use Php and Mysql among other languages. Im getting confused on whether or not Im supposed to create tables in mysql before creating the forms in php.
How do I link PHP to Mysql Server and how do I upload Php. How do I create forms in PHP using Msql as Database
Your question is a bit too broad to answer fully.
That said, you can use PHP just like you would any old HTML document.
PHP will already be installed by your Web hosting company. You shouldn't need to install anything.
MySQL is not really a language; it's a relational database management system.
Generally speaking, if you intend to make a data-driven Web site, you need to have the data -- or, at least its structures -- in place before you can begin programming.
You should start by getting a copy of "PHP For Dummies." It really will help you.
Reply:My dear , u asked a general question which means u should learn interaction between DB and PHP and .... ,
i think u can find lotof PDFs over the net that they talks about it clearly otherwise u can use PHP documentation in MySql section , also there is good tips and examples .
How do I link PHP to Mysql Server and how do I upload Php. How do I create forms in PHP using Msql as Database
Your question is a bit too broad to answer fully.
That said, you can use PHP just like you would any old HTML document.
PHP will already be installed by your Web hosting company. You shouldn't need to install anything.
MySQL is not really a language; it's a relational database management system.
Generally speaking, if you intend to make a data-driven Web site, you need to have the data -- or, at least its structures -- in place before you can begin programming.
You should start by getting a copy of "PHP For Dummies." It really will help you.
Reply:My dear , u asked a general question which means u should learn interaction between DB and PHP and .... ,
i think u can find lotof PDFs over the net that they talks about it clearly otherwise u can use PHP documentation in MySql section , also there is good tips and examples .
Where can I find a free webhosting site that will support my formmail.php for testing purposes?
I need to find a webhost site to use as a testing ground for my formmail.php, and other PHP learning.
Where can I find a free webhosting site that will support my formmail.php for testing purposes?
Microsoft offers free hosting and domain name, one per user, (credit card requires, though they don't charge it, they just want to make sure its real).
Or you could honestly test it on your own computer, if you set your comp up as the server, not too hard, and all you need is a WAMP server or something along those lines, google WAMP, youll get a lot of info, and since its freeware, woot!
gl.
Reply:We always use http://10001mb.com and http://66ghz.com
Where can I find a free webhosting site that will support my formmail.php for testing purposes?
Microsoft offers free hosting and domain name, one per user, (credit card requires, though they don't charge it, they just want to make sure its real).
Or you could honestly test it on your own computer, if you set your comp up as the server, not too hard, and all you need is a WAMP server or something along those lines, google WAMP, youll get a lot of info, and since its freeware, woot!
gl.
Reply:We always use http://10001mb.com and http://66ghz.com
How do I include a PHP (or even HTML) page into into my PHP template when I click a link?
I have a template, written in PHP, and I have a series of links to certain pages in my site. I am aware that PHP allows you to "include" pages using the include tag, but how do I control which page to include using a link?
Also, do all of the pages that I want to include need to be saved as a PHP format, or can I insert HTML pages just the same?
Worst case scenario, I will need to create a HTML template in Dreamweaver and edit my pages using that instead. I hope that the PHP include is quicker.
How do I include a PHP (or even HTML) page into into my PHP template when I click a link?
You can do it in a few different ways:
%26lt;?php include("menu.php"); ?%26gt;
%26lt;?php include_once("menu.php"); ?%26gt;
OR..
%26lt;?php require("menu.php"); ?%26gt;
%26lt;?php require_once("menu.php"); ?%26gt;
Let me explain the difference:
If using include or include_once can throw a parse error if the the direction to the file is not corrrect.
If using require or require once, if the the direction to the file is not corrrect you will get a fatal error.
Reply:Using PHP's include function, you can include what you want. It doesn't have to be .php or .html. For example, all of my includes are named as such: header.inc and they work just fine.
As for the execution ... let's say you have a navigation menu that you want to include on the left side of every page. Just start everypage like this:
%26lt;?php
include("includes/nav.inc");
?%26gt;
This is assuming that you have your directory structure like this:
root/index.php (the page using the include function)
root/includes/nav.inc (the include file that you want to use)
The huge benefit to using includes is that you can change only one file, and it cascades throughout your entire site, because all pages merely reference that file.
Good luck!
business cards
Also, do all of the pages that I want to include need to be saved as a PHP format, or can I insert HTML pages just the same?
Worst case scenario, I will need to create a HTML template in Dreamweaver and edit my pages using that instead. I hope that the PHP include is quicker.
How do I include a PHP (or even HTML) page into into my PHP template when I click a link?
You can do it in a few different ways:
%26lt;?php include("menu.php"); ?%26gt;
%26lt;?php include_once("menu.php"); ?%26gt;
OR..
%26lt;?php require("menu.php"); ?%26gt;
%26lt;?php require_once("menu.php"); ?%26gt;
Let me explain the difference:
If using include or include_once can throw a parse error if the the direction to the file is not corrrect.
If using require or require once, if the the direction to the file is not corrrect you will get a fatal error.
Reply:Using PHP's include function, you can include what you want. It doesn't have to be .php or .html. For example, all of my includes are named as such: header.inc and they work just fine.
As for the execution ... let's say you have a navigation menu that you want to include on the left side of every page. Just start everypage like this:
%26lt;?php
include("includes/nav.inc");
?%26gt;
This is assuming that you have your directory structure like this:
root/index.php (the page using the include function)
root/includes/nav.inc (the include file that you want to use)
The huge benefit to using includes is that you can change only one file, and it cascades throughout your entire site, because all pages merely reference that file.
Good luck!
business cards
Subscribe to:
Posts (Atom)