I am getting hit hardcore by spambots and loooove the format of my guestbook - the only problem is there is no image verification option. Can I add this myself?
The guestbook is Advanced Guestbook 2.3.1
Powered by PHP %26amp; MySQL - I know I can edit the code, im just not sure if its possible to include a feature like this.
Is there a line of code I can add to a php guestbook to add image verification?
Unless there's a premade modification out there, you'll have to add it in manually and it's usually more than a single line of code.
Here's a tutorial on how to make one
http://www.visualbuilder.com/viewpages.p...
And here's a pre made one, but you'll need to add it manually to your guestbook
http://www.cocoavillagepublishing.com/de...
Friday, July 31, 2009
How to store an uploaded file to a variable in PHP?
Is there a way to store a file to a variable rather than copying or moving it to a specified location in the server?
How to store an uploaded file to a variable in PHP?
Yes, you can use the file_get_contents() function.
Example where the field name for the uploaded file is "source":
%26lt;?php
$filename = $_FILES['source']['tmp_name'];
$text = file_get_contents($filename);
echo "This is the contents: $text";
?%26gt;
How to store an uploaded file to a variable in PHP?
Yes, you can use the file_get_contents() function.
Example where the field name for the uploaded file is "source":
%26lt;?php
$filename = $_FILES['source']['tmp_name'];
$text = file_get_contents($filename);
echo "This is the contents: $text";
?%26gt;
What is a good platform for writing complex web apps in php?
looking for a platform for handling business objects as well as application flow so people would not have to hard code each page transition and each business logic step in php.
What do people recommend?
What is a good platform for writing complex web apps in php?
You can use of of the many php MVC Framework. One of the most used one is phpMVC.
Quoted from their website "php.MVC implements the Model-View-Controller (MVC) design pattern, and encourages application design based on the Model 2 paradigm. This design model allows the Web page or other contents (View) to be mostly separated from the internal application code (Controller/Model), making it easier for designers and programmers to focus on their respective areas of expertise.
The framework provides a single entry point Controller. The Controller is responsible for allocating HTTP requests to the appropriate Action handler (Model) based on configuration mappings.
The Model contains the business logic for the application. The Controller then forwards the request to the appropriate View component, which is usually implemented using a combination of HTML with PHP tags in the form of templates. The resulting contents are returned to the client browser, or via another protocol such as SMTP.
php.MVC is a PHP port of Jakarta Struts. It currently supports many features of Struts, including declarative application configuration via the XML digester. For example, mappings from the various Action business logic components to appropriate results pages can be specified declaratively in the XML configuration file. "
Reply:Please consider that a "Good Platform" would take into account the environement that the application will be run in, goals for the application, and who is going to maintain the application.
I have successfully used Blueshoes, and Seagull in several contract projects. Blueshoes is pretty complex and has a learning curve, but is extremely useful framework, it also has some licensing restrictions that keep it in the corporate arena.
Seagull is actively developed and completely free. Seagull has TONS of documentation and a very active community.
Hope this helps.
What do people recommend?
What is a good platform for writing complex web apps in php?
You can use of of the many php MVC Framework. One of the most used one is phpMVC.
Quoted from their website "php.MVC implements the Model-View-Controller (MVC) design pattern, and encourages application design based on the Model 2 paradigm. This design model allows the Web page or other contents (View) to be mostly separated from the internal application code (Controller/Model), making it easier for designers and programmers to focus on their respective areas of expertise.
The framework provides a single entry point Controller. The Controller is responsible for allocating HTTP requests to the appropriate Action handler (Model) based on configuration mappings.
The Model contains the business logic for the application. The Controller then forwards the request to the appropriate View component, which is usually implemented using a combination of HTML with PHP tags in the form of templates. The resulting contents are returned to the client browser, or via another protocol such as SMTP.
php.MVC is a PHP port of Jakarta Struts. It currently supports many features of Struts, including declarative application configuration via the XML digester. For example, mappings from the various Action business logic components to appropriate results pages can be specified declaratively in the XML configuration file. "
Reply:Please consider that a "Good Platform" would take into account the environement that the application will be run in, goals for the application, and who is going to maintain the application.
I have successfully used Blueshoes, and Seagull in several contract projects. Blueshoes is pretty complex and has a learning curve, but is extremely useful framework, it also has some licensing restrictions that keep it in the corporate arena.
Seagull is actively developed and completely free. Seagull has TONS of documentation and a very active community.
Hope this helps.
What are the available characters in a url to get specific fields from yahoo! finance via a php page?
I want to be able to create a web page that allows a user to select fields, then create a quote from yahoo! finance using the fields the user selected. What are the field/keyword values that are available.
Please give me another useless answer like "it should be listed under help", or "look on the developer page".
What are the available characters in a url to get specific fields from yahoo! finance via a php page?
Hi,
Here's one approach that might work. I don't know if you already know about Finance Badges. They're documented at:
http://finance.yahoo.com/badges
These require IFRAME. That requirement is documented at:
http://help.yahoo.com/help/us/fin/badges...
If you don't have IFRAME support, this is probably a deadend. If you do, you can use the Finance Badge Wizard to generate static HTML code like this:
%26lt;!-- Start of Yahoo! Finance code --%26gt;
%26lt;iframe allowtransparency="true" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no" src="http://api.finance.yahoo.com/instru... width="200px" height="338px"%26gt;%26lt;/iframe%26gt;
%26lt;!-- End of Yahoo! Finance code --%26gt;
This asks for quotes for Oracle (ORCL) and Pfizer (PFE). I supposed you could let your user select other stocks (up to 10), and substitute their ticker symbols where "ORCL,PFE" occurs in the above code.
(It turns out the link in the above text is live. If you click on it, you get a page with the quotes for ORCL %26amp; PFE.)
The tricky part is getting the code to "execute" with the new values your user chose. I wouldn't know how to do that.
There may be other Yahoo Finance APIs that I don't know about. Have you looked at Yahoo Widgets? They're at:
http://widgets.yahoo.com/
You don't want a widget, because a widget runs on the client side. But there are some stock quote widgets that retrieve data from Yahoo. You might be able to use whatever API they use.
Hope one or the other of these helps.
Added note: besides the technical problem, there's a legal aspect to this question. Basically Yahoo doesn't allow you to just retrieve data from their web site and display it at yours, without giving them any credit. That's one reason the Finance Badges, which do appear at your web site, say "Yahoo Finance" at the top and have a link to Copyright info at the bottom. I think the Finance Badges are the only Yahoo-approved way of displaying quotes from Yahoo at your web site.
greeting cards
Please give me another useless answer like "it should be listed under help", or "look on the developer page".
What are the available characters in a url to get specific fields from yahoo! finance via a php page?
Hi,
Here's one approach that might work. I don't know if you already know about Finance Badges. They're documented at:
http://finance.yahoo.com/badges
These require IFRAME. That requirement is documented at:
http://help.yahoo.com/help/us/fin/badges...
If you don't have IFRAME support, this is probably a deadend. If you do, you can use the Finance Badge Wizard to generate static HTML code like this:
%26lt;!-- Start of Yahoo! Finance code --%26gt;
%26lt;iframe allowtransparency="true" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no" src="http://api.finance.yahoo.com/instru... width="200px" height="338px"%26gt;%26lt;/iframe%26gt;
%26lt;!-- End of Yahoo! Finance code --%26gt;
This asks for quotes for Oracle (ORCL) and Pfizer (PFE). I supposed you could let your user select other stocks (up to 10), and substitute their ticker symbols where "ORCL,PFE" occurs in the above code.
(It turns out the link in the above text is live. If you click on it, you get a page with the quotes for ORCL %26amp; PFE.)
The tricky part is getting the code to "execute" with the new values your user chose. I wouldn't know how to do that.
There may be other Yahoo Finance APIs that I don't know about. Have you looked at Yahoo Widgets? They're at:
http://widgets.yahoo.com/
You don't want a widget, because a widget runs on the client side. But there are some stock quote widgets that retrieve data from Yahoo. You might be able to use whatever API they use.
Hope one or the other of these helps.
Added note: besides the technical problem, there's a legal aspect to this question. Basically Yahoo doesn't allow you to just retrieve data from their web site and display it at yours, without giving them any credit. That's one reason the Finance Badges, which do appear at your web site, say "Yahoo Finance" at the top and have a link to Copyright info at the bottom. I think the Finance Badges are the only Yahoo-approved way of displaying quotes from Yahoo at your web site.
greeting cards
How does one add a variable and a number in PHP?
I'm creating a verification script in PHP, to check if $var is set to "1". I figured using addition would be the easiest way to do so, so I tried this...
if ($var + 1) = 2){
print "The variable is set to 1.";
exit;
}
I must have an error in syntax or something, because I get an "unexpected '='" error when exeuting the script.
How do I fix up that code?
How does one add a variable and a number in PHP?
You need to use == which is the equal to comparison operator. A single = is an assignment.
$A=1 // Sets a to 1
$A==1 // Is $A equal to 1?The answer will be true or false.
More specifically:
if ($var + 1) == 2){
print "The variable is set to 1.";
exit;
}
if ($var + 1) = 2){
print "The variable is set to 1.";
exit;
}
I must have an error in syntax or something, because I get an "unexpected '='" error when exeuting the script.
How do I fix up that code?
How does one add a variable and a number in PHP?
You need to use == which is the equal to comparison operator. A single = is an assignment.
$A=1 // Sets a to 1
$A==1 // Is $A equal to 1?The answer will be true or false.
More specifically:
if ($var + 1) == 2){
print "The variable is set to 1.";
exit;
}
Can someone please help me make a short and quick PHP code?
I am not really good at PHP, but I have 1 code that works:
if ($operation =="multiply")
{
$product =$firstnumber * $secondnumber;
echo ($firstnumber." * ".$secondnumber." = ".$product);
Now I want to make one that squares instead of multiply, so can someone help me build one?
Thank you in advance!
Can someone please help me make a short and quick PHP code?
I agree with the last poster, that's the quickest way to do it...but given that you only want to square...
if ($operation=="square")
{
$result=$number*$number;
echo $result;
}
Reply:if ($operation =="sqrt")
{
$product =sqrt $firstnumber;
echo (" The square root of ".$firstnumber." = ".$product);
This might work, IDK??!
Reply:Use the pow math function:
%26lt;?php
echo pow(4,2) . "
";
echo pow(6,2) . "
";
echo pow(-6,2) . "
";
echo pow(-6,-2) . "
";
echo pow(-6,5.5);
?%26gt;
if ($operation =="multiply")
{
$product =$firstnumber * $secondnumber;
echo ($firstnumber." * ".$secondnumber." = ".$product);
Now I want to make one that squares instead of multiply, so can someone help me build one?
Thank you in advance!
Can someone please help me make a short and quick PHP code?
I agree with the last poster, that's the quickest way to do it...but given that you only want to square...
if ($operation=="square")
{
$result=$number*$number;
echo $result;
}
Reply:if ($operation =="sqrt")
{
$product =sqrt $firstnumber;
echo (" The square root of ".$firstnumber." = ".$product);
This might work, IDK??!
Reply:Use the pow math function:
%26lt;?php
echo pow(4,2) . "
";
echo pow(6,2) . "
";
echo pow(-6,2) . "
";
echo pow(-6,-2) . "
";
echo pow(-6,5.5);
?%26gt;
Do you know any server, where I can create php sites and I can use mysql database?
I would like to use telnet or ssh session to administer my mysql database and develop my php sites with vi editor.
Do you know any server, where I can create php sites and I can use mysql database?
Hi
For information about free php hosting, visit the following url
http://www.0php.com/free_PHP_hosting.php
Regards
Reply:Thousands of hosts allow this, but you won't find any for free. If I had to recommend one, I would recommend GoDaddy.com. Great features, great speed, low cost.
Do you know any server, where I can create php sites and I can use mysql database?
Hi
For information about free php hosting, visit the following url
http://www.0php.com/free_PHP_hosting.php
Regards
Reply:Thousands of hosts allow this, but you won't find any for free. If I had to recommend one, I would recommend GoDaddy.com. Great features, great speed, low cost.
Where to learn about designing my own role playing game; in the format of PHP?
I'd like to design my own role playing game; using PHP. The game would to include athletes competing against other atheletes. Kinda like a war game but intead this would be in the format of sports.
I know some basics of PHP. Basically, I am looking for a PHP role playing script that is easy to read and made additions.
Where to learn about designing my own role playing game; in the format of PHP?
Well, I can't help you in finding an existing script that you can modify, but PHP is a perfectly acceptable language for developing a text-based, static-image RPG. If you were to develop the basic outline of the game in simple pseudocode, I'm sure you wouldn't have any trouble finding someone willing to convert it into working PHP code for you on forums around the Web (or if you don't mind paying, on sites such as RentACoder.com). PHP isn't that difficult a language anyway, so you could probably do it yourself by just learning the basics.
For the record, the official PHP site is php.net (someone mentioned .org) - and you can't just go asking them to help you with your projects or do the work for you :)
Reply:erm u could ask some experts on php.org or email them i guess. i dont no much php tho
Reply:You're better off creating some sort of Java (not Javascript) app.
flower arranging
I know some basics of PHP. Basically, I am looking for a PHP role playing script that is easy to read and made additions.
Where to learn about designing my own role playing game; in the format of PHP?
Well, I can't help you in finding an existing script that you can modify, but PHP is a perfectly acceptable language for developing a text-based, static-image RPG. If you were to develop the basic outline of the game in simple pseudocode, I'm sure you wouldn't have any trouble finding someone willing to convert it into working PHP code for you on forums around the Web (or if you don't mind paying, on sites such as RentACoder.com). PHP isn't that difficult a language anyway, so you could probably do it yourself by just learning the basics.
For the record, the official PHP site is php.net (someone mentioned .org) - and you can't just go asking them to help you with your projects or do the work for you :)
Reply:erm u could ask some experts on php.org or email them i guess. i dont no much php tho
Reply:You're better off creating some sort of Java (not Javascript) app.
flower arranging
How do i connect to SQL server with PHP?
My pages run 100% ok on linux, but i need to use an SQL database and retain my PHP. This will probably run on a windows server. Someone give me the connection script for this.
How do i connect to SQL server with PHP?
If you have to connect to database in server you can use this script:
$connection=mssql_connect ($host, $username, $password);
But if you have to connect to the local host:
you should download Zip Package From this site(depends on php version):
http://www.php.net/downloads.php
and copy php_mssql.dll file to winnt\system32
and you should configure php.ini file by adding extension=php_mssql.dll
Reply:here's the code:
mysql_connect("hostname",
"username","password");
the username and password are optional, i think.
use this to connect to the database, i assume you already know this:
mysql_select_db("dbname");
Reply:what kind of SQL? if you meant MSSQL, here's how...
$conn=mssql_connect ($servername, $username, $password);
Reply:%26lt;?php
$conn = mysql_connect("localhost","USERNAME","PA...
mysql_select_db('DATABASE NAME') or die(mysql_error());
?%26gt;
sry are you talking about this ?
Reply:you might see the answer here:
www.w3schools.com
How do i connect to SQL server with PHP?
If you have to connect to database in server you can use this script:
$connection=mssql_connect ($host, $username, $password);
But if you have to connect to the local host:
you should download Zip Package From this site(depends on php version):
http://www.php.net/downloads.php
and copy php_mssql.dll file to winnt\system32
and you should configure php.ini file by adding extension=php_mssql.dll
Reply:here's the code:
mysql_connect("hostname",
"username","password");
the username and password are optional, i think.
use this to connect to the database, i assume you already know this:
mysql_select_db("dbname");
Reply:what kind of SQL? if you meant MSSQL, here's how...
$conn=mssql_connect ($servername, $username, $password);
Reply:%26lt;?php
$conn = mysql_connect("localhost","USERNAME","PA...
mysql_select_db('DATABASE NAME') or die(mysql_error());
?%26gt;
sry are you talking about this ?
Reply:you might see the answer here:
www.w3schools.com
How to get a screenshot of youtube video thumbnail and put it on your website using php?
i want to make a video gallery on my website like this (http://slideshowpro.net/examples/), but instead called out the videos i've listed from youtube.
how to get a screenshot of youtube video thumbnail and put it on your website using php without having users to save the thumbnail from youtube and upload it to my server?
How to get a screenshot of youtube video thumbnail and put it on your website using php?
You can use the youtube api or standard rss feeds of youtube.
It provided all data that can be shared on your web site...
Rss feeds have xml format including
title
description
thumbnails
duration
rating
etc...
that can be displayed on web page...
You can learn about youtube api from
http://code.google.com
how to get a screenshot of youtube video thumbnail and put it on your website using php without having users to save the thumbnail from youtube and upload it to my server?
How to get a screenshot of youtube video thumbnail and put it on your website using php?
You can use the youtube api or standard rss feeds of youtube.
It provided all data that can be shared on your web site...
Rss feeds have xml format including
title
description
thumbnails
duration
rating
etc...
that can be displayed on web page...
You can learn about youtube api from
http://code.google.com
What are the ten best sites built in PHP ?
PHP has taken off as a development platform, what really important products have been built with it ?
What are the ten best sites built in PHP ?
php is BLAH- all the sites look the exact same. Pick any site done with php- and there's your "best site". x1
Reply:Well I'm not sure about the 'best', but here are a few big sites using PHP:
Facebook
Wikipedia (actually, all MediaWiki sites)
WordPress
And other big uses (though not necessarily websites):
phpBB
phpMyAdmin
Coppermine Photo Gallery
Reply:Ah, we can see that the previous answerer is obviously a professional. PHP has absolutely nothing to do with the look or feel of a site.
I don't know about a straight top 10 list - that is pretty subjective. A really good example of a major platform that runs on PHP is Facebook - one of the most visited websites on the internet and a very resource-intensive system.
What are the ten best sites built in PHP ?
php is BLAH- all the sites look the exact same. Pick any site done with php- and there's your "best site". x1
Reply:Well I'm not sure about the 'best', but here are a few big sites using PHP:
Wikipedia (actually, all MediaWiki sites)
WordPress
And other big uses (though not necessarily websites):
phpBB
phpMyAdmin
Coppermine Photo Gallery
Reply:Ah, we can see that the previous answerer is obviously a professional. PHP has absolutely nothing to do with the look or feel of a site.
I don't know about a straight top 10 list - that is pretty subjective. A really good example of a major platform that runs on PHP is Facebook - one of the most visited websites on the internet and a very resource-intensive system.
How can I know about open soucre php software script?
I want to get some simple software source code what are designed by php.
How can I know about open soucre php software script?
phpclasses.org is a great location for small code snippets.
Reply:Try this website: http://www.mysqlphpcode.com/ . This is a pretty good code.
flower arrangement
How can I know about open soucre php software script?
phpclasses.org is a great location for small code snippets.
Reply:Try this website: http://www.mysqlphpcode.com/ . This is a pretty good code.
flower arrangement
How can we learn dimensions of the client area of Internet Explorer with PHP, JavaScript or HTML?
I need to know the height and width of the window to make some calculations. But, how can I learn these dimensions???
How can we learn dimensions of the client area of Internet Explorer with PHP, JavaScript or HTML?
You can get the width and height of the window using javascript
in Netscape Navigator:
window.innerWidth, window.innerHeight
in Microsoft Internet Explorer:
document.body.offsetWidth, document.body.offsetHeight
Reply:Here is a better approach to get the window dimensions with Javascript:
var myWidth = 0, myHeight = 0;
if( typeof( window.innerWidth ) == 'number' ) {
//Non-IE
myWidth = window.innerWidth;
myHeight = window.innerHeight;
} else if( document.documentElement %26amp;%26amp; ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
//IE 6+ in 'standards compliant mode'
myWidth = document.documentElement.clientWidth;
myHeight = document.documentElement.clientHeight;
} else if( document.body %26amp;%26amp; ( document.body.clientWidth || document.body.clientHeight ) ) {
//IE 4 compatible
myWidth = document.body.clientWidth;
myHeight = document.body.clientHeight;
}
window.alert( 'Width = ' + myWidth );
window.alert( 'Height = ' + myHeight );
How can we learn dimensions of the client area of Internet Explorer with PHP, JavaScript or HTML?
You can get the width and height of the window using javascript
in Netscape Navigator:
window.innerWidth, window.innerHeight
in Microsoft Internet Explorer:
document.body.offsetWidth, document.body.offsetHeight
Reply:Here is a better approach to get the window dimensions with Javascript:
var myWidth = 0, myHeight = 0;
if( typeof( window.innerWidth ) == 'number' ) {
//Non-IE
myWidth = window.innerWidth;
myHeight = window.innerHeight;
} else if( document.documentElement %26amp;%26amp; ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
//IE 6+ in 'standards compliant mode'
myWidth = document.documentElement.clientWidth;
myHeight = document.documentElement.clientHeight;
} else if( document.body %26amp;%26amp; ( document.body.clientWidth || document.body.clientHeight ) ) {
//IE 4 compatible
myWidth = document.body.clientWidth;
myHeight = document.body.clientHeight;
}
window.alert( 'Width = ' + myWidth );
window.alert( 'Height = ' + myHeight );
How do you call a php file to be executed within an html file?
Let's say the document i'm working on is index.html and I want to reference wally.php within the html document. Php code is as follows:
%26lt;?
echo "Hello Wally";
?%26gt;
Need the html code to reference this php script so it is executed within the html document.
How do you call a php file to be executed within an html file?
you can place the code directly into the body of the html OR you can create a separate php file - like hello.php, then include it in your html wherever you want to use it like this
%26lt;?
include("hello.php")
?%26gt;
here's a link to a good tutorial on the include function in php:
http://www.tizag.com/phpT/include.php
Reply:you shoul use the tag :"form" like this:
in your index.html, write this code:
%26lt;form method="GET" action="wally.php"%26gt;%26lt;/form%26gt;
or this one
%26lt;form method="POST" action="wally.php"%26gt;%26lt;/form%26gt;
Reply:The way to execute PHP on a .html page is to modify your .htaccess file. This file may be hidden, so depending upon your FTP program you may have to modify some settings to see it. Then you just need to add this line for .html:
AddType application/x-httpd-php .html
%26lt;?
echo "Hello Wally";
?%26gt;
Need the html code to reference this php script so it is executed within the html document.
How do you call a php file to be executed within an html file?
you can place the code directly into the body of the html OR you can create a separate php file - like hello.php, then include it in your html wherever you want to use it like this
%26lt;?
include("hello.php")
?%26gt;
here's a link to a good tutorial on the include function in php:
http://www.tizag.com/phpT/include.php
Reply:you shoul use the tag :"form" like this:
in your index.html, write this code:
%26lt;form method="GET" action="wally.php"%26gt;%26lt;/form%26gt;
or this one
%26lt;form method="POST" action="wally.php"%26gt;%26lt;/form%26gt;
Reply:The way to execute PHP on a .html page is to modify your .htaccess file. This file may be hidden, so depending upon your FTP program you may have to modify some settings to see it. Then you just need to add this line for .html:
AddType application/x-httpd-php .html
How do you determine the number of rows in a mySQL table with PHP?
I want to determine the number of rows in a mySQL table and store it in a variable. Could someone please help me with the syntax?
How do you determine the number of rows in a mySQL table with PHP?
Just use the query "select count(*) as total from tablename" and it will return a result set where the field is called "total" and contains the number of rows from the table.
Edit: You could also use mysql_num_rows(result). I have provided the link for it below.
Enjoy!
How do you determine the number of rows in a mySQL table with PHP?
Just use the query "select count(*) as total from tablename" and it will return a result set where the field is called "total" and contains the number of rows from the table.
Edit: You could also use mysql_num_rows(result). I have provided the link for it below.
Enjoy!
How can I emulate a php enviroment?
Im trying to learn PHP. I found a freesource PHP website and have downloaded it. I need to know how I could simulate the PHP enviroment so I can veiw the site as if it were accually on the web and use it to see if my tinkering and editing accually works properly.
How can I emulate a php enviroment?
There are a number of programs that can install a php environment on your Windows machine.
I just installed a product called XAMPP and it is pretty painless and works well for testing your scripts in a local environment.
http://www.apachefriends.org/en/xampp.ht...
Just follow the directions and you should be good to go.
Reply:What you need to do is actually install a server such as apache. You can do this fairly easily. Instructions are on the Apache website.
You may also want the MySql database server if your scripts will need a database. It is free too and available for most platforms.
You can then store your web pages and scripts in the apache html directory ad view them as if they are on an actual server.
Reply:We are currently using easyPHP, which is also quite good:
http://www.easyphp.org/?lang=en
Reply:For this you will need a web-server which can run *.php files. You can use Apache(window+linux), or IIS(Windows only). You will have to configure PHP on both of these.
If you don't want to configure PHP manually, then just download XAMPP from (http://www.apachefriends.org) and install it on your pc. It is pre-configured PHP, Apache, MySQL. Just download+install and u can use this.
eurovision song contest
How can I emulate a php enviroment?
There are a number of programs that can install a php environment on your Windows machine.
I just installed a product called XAMPP and it is pretty painless and works well for testing your scripts in a local environment.
http://www.apachefriends.org/en/xampp.ht...
Just follow the directions and you should be good to go.
Reply:What you need to do is actually install a server such as apache. You can do this fairly easily. Instructions are on the Apache website.
You may also want the MySql database server if your scripts will need a database. It is free too and available for most platforms.
You can then store your web pages and scripts in the apache html directory ad view them as if they are on an actual server.
Reply:We are currently using easyPHP, which is also quite good:
http://www.easyphp.org/?lang=en
Reply:For this you will need a web-server which can run *.php files. You can use Apache(window+linux), or IIS(Windows only). You will have to configure PHP on both of these.
If you don't want to configure PHP manually, then just download XAMPP from (http://www.apachefriends.org) and install it on your pc. It is pre-configured PHP, Apache, MySQL. Just download+install and u can use this.
eurovision song contest
How do I create user accounts for mySQL using php?
I need to add user accounts to mySQL using php.
I have to following code but am unsure how to execute it:
GRANT ALL PRIVILEGES ON *.* TO 'testuser'@'localhost' IDENTIFIED BY 'testpass' WITH GRANT OPTION
When I run this through phpmyadmin I get:
Access denied for user 'craig'@'localhost' (using password: YES)
'craig' is not a mySQL user account, it is my web host login
Is that why I get the error?
How do I run this from php?
Can I execute it with mysql_query()? or is there something else?
How do I create user accounts for mySQL using php?
Hello,
That is because your webhost company does not allow you to Add a new user since your current user 'craig' does not have enough priveleges.
Basically, many shared webhosting companies are like that. They usually have a web admin panel such as CPanel or anything similar, that you add MySQL users there! Then you can login using that.
So lets repeat:
I assume you havn't created a Database User yet using your webhosting service. (go on their administration page, and check MySQL section and create user from there)
That is not the reason why your getting that error. You already logged in PHPMyAdmin :) so you do have a MySQL user which is active. I assume.
So technically speaking, you have to use their tool to create users, and that current user that your using has no permission to create a new user.
Good Luck
I have to following code but am unsure how to execute it:
GRANT ALL PRIVILEGES ON *.* TO 'testuser'@'localhost' IDENTIFIED BY 'testpass' WITH GRANT OPTION
When I run this through phpmyadmin I get:
Access denied for user 'craig'@'localhost' (using password: YES)
'craig' is not a mySQL user account, it is my web host login
Is that why I get the error?
How do I run this from php?
Can I execute it with mysql_query()? or is there something else?
How do I create user accounts for mySQL using php?
Hello,
That is because your webhost company does not allow you to Add a new user since your current user 'craig' does not have enough priveleges.
Basically, many shared webhosting companies are like that. They usually have a web admin panel such as CPanel or anything similar, that you add MySQL users there! Then you can login using that.
So lets repeat:
I assume you havn't created a Database User yet using your webhosting service. (go on their administration page, and check MySQL section and create user from there)
That is not the reason why your getting that error. You already logged in PHPMyAdmin :) so you do have a MySQL user which is active. I assume.
So technically speaking, you have to use their tool to create users, and that current user that your using has no permission to create a new user.
Good Luck
How to create a form in PHP to download reports from external source?
I have a list of reports that I would like to be able to pull from a form dropdown and use PHP to generate a url to download this report.
This is the base url:
http://website/reports/report.aspx?ItemP... NAME}Tab%26amp;Export=true"%26gt;
I would like to fill in REPORT NAME from the dropdown box and print the link on the page.
How to create a form in PHP to download reports from external source?
Hmm...So the reports themselves are located at an external source, and you'd just like to print a link to that report....with a variable "report name"?
%26lt;?php
$base_url="http://www.website.com/repo...
$report=$_POST['report_name']; //From Select Box
//We concenate the value of $report to the rest of our URL
$list_url=$base_url.$report;
//Print URL
echo $list_url;
?%26gt;
%26lt;form name="form" method="post" action="#"%26gt;
%26lt;select name="report_name"%26gt;
%26lt;option value="report1.htm"%26gt;Report1%26lt;/option%26gt;
%26lt;option value="report2.htm"%26gt;Report2%26lt;/option%26gt;
%26lt;/select%26gt;
%26lt;/form%26gt;
/////////////////////
In the code above, you just set the value of your "option" tags
to whatever you'd like the variable part of the URL to be...when the PHP script parses your report_name POST variable, it will append that to the end of your base URL and print the result.
?%26gt;
This is the base url:
http://website/reports/report.aspx?ItemP... NAME}Tab%26amp;Export=true"%26gt;
I would like to fill in REPORT NAME from the dropdown box and print the link on the page.
How to create a form in PHP to download reports from external source?
Hmm...So the reports themselves are located at an external source, and you'd just like to print a link to that report....with a variable "report name"?
%26lt;?php
$base_url="http://www.website.com/repo...
$report=$_POST['report_name']; //From Select Box
//We concenate the value of $report to the rest of our URL
$list_url=$base_url.$report;
//Print URL
echo $list_url;
?%26gt;
%26lt;form name="form" method="post" action="#"%26gt;
%26lt;select name="report_name"%26gt;
%26lt;option value="report1.htm"%26gt;Report1%26lt;/option%26gt;
%26lt;option value="report2.htm"%26gt;Report2%26lt;/option%26gt;
%26lt;/select%26gt;
%26lt;/form%26gt;
/////////////////////
In the code above, you just set the value of your "option" tags
to whatever you'd like the variable part of the URL to be...when the PHP script parses your report_name POST variable, it will append that to the end of your base URL and print the result.
?%26gt;
Is it possible to use php to pass variables to MS Word?
I'm creating an online exam website. When a student passes a test, I'd like to have their information entered automatically into a Word file. I don't think this is possible, but I could be wrong.
Is it possible to use php to pass variables to MS Word?
This might help:
http://web.informbank.com/articles/techn...
Reply:Probably the easiest way for you to do this from a php-based site is to save the word document as rich text format (RTF) and then use a regular expression to substitute the name in. If the user has word installed on their PC and the browser downloads an RTF document the document will open in word and then the user can save it in .doc format, as long as you set the mime-type correctly.
Is it possible to use php to pass variables to MS Word?
This might help:
http://web.informbank.com/articles/techn...
Reply:Probably the easiest way for you to do this from a php-based site is to save the word document as rich text format (RTF) and then use a regular expression to substitute the name in. If the user has word installed on their PC and the browser downloads an RTF document the document will open in word and then the user can save it in .doc format, as long as you set the mime-type correctly.
How do i let people upload to one of my websites with a php script?
Ok here is what i need i need them to be able to upload something
with a php script and i need the script to index them with an optional picture and comments
oh in case you want to know its http://www.simcitysocieties.us/
How do i let people upload to one of my websites with a php script?
Before you do this, please read:
http://www.dougv.com/blog/2007/06/10/the...
That said, the PHP manual explains file uploading:
http://us2.php.net/features.file-upload
Reply:Uploading is done with a form input:
%26lt;input type=file name=uploadfile%26gt;
Your PHP will have to process this file and it's pretty involved because you have to check a lot of things for validation so I'm going to give you this link and you can choose a good free script.
This link has several scripts - pick a free one and follow its instructions:
http://php.resourceindex.com/Complete_Sc...
wedding song
with a php script and i need the script to index them with an optional picture and comments
oh in case you want to know its http://www.simcitysocieties.us/
How do i let people upload to one of my websites with a php script?
Before you do this, please read:
http://www.dougv.com/blog/2007/06/10/the...
That said, the PHP manual explains file uploading:
http://us2.php.net/features.file-upload
Reply:Uploading is done with a form input:
%26lt;input type=file name=uploadfile%26gt;
Your PHP will have to process this file and it's pretty involved because you have to check a lot of things for validation so I'm going to give you this link and you can choose a good free script.
This link has several scripts - pick a free one and follow its instructions:
http://php.resourceindex.com/Complete_Sc...
wedding song
How can I run a PHP function asynchronously?
Every one of my pages starts with a common php file. What I would like to do is within the common file, call a function/class which does "stuff", but in the background. So I would like to "initiate" the call, but then just move on with my script so the user doesn't wait for the function/class to finish its execution.
There's no output from this function/class it just performs its activity with session/environment variables, etc.
Thanks.
How can I run a PHP function asynchronously?
You will run up against the PHP 30 second timeout which will kill your script. PHP has no explicit thread support. You could do it by getting tricky, depending on what exactly you need to do.
You might consider callings something external and pass it all the info you want processed (via a pipe or file). You can program the task in any language the server supports.
Here is a 'threads' search on the php.net website. Might be enough...
There's no output from this function/class it just performs its activity with session/environment variables, etc.
Thanks.
How can I run a PHP function asynchronously?
You will run up against the PHP 30 second timeout which will kill your script. PHP has no explicit thread support. You could do it by getting tricky, depending on what exactly you need to do.
You might consider callings something external and pass it all the info you want processed (via a pipe or file). You can program the task in any language the server supports.
Here is a 'threads' search on the php.net website. Might be enough...
What are the websites that i can use to help me learn php programming ?
what are the websites that i can use to help me learn php programming ?
What are the websites that i can use to help me learn php programming ?
http://www.w3schools.com/php/default.asp
http://www.learnphpfree.com/
http://www.php-learn-it.com/
http://www.phpfreaks.com/
it teach php
http://www.php.net/ for all kind of documentary
http://www.easyphp.org/ ( you download it on your PC you will have php installed with mysql and phpmyadmin with Apache server)
http://www.opensourcecms.com/ ( you can find CMS for free as well)
What are the websites that i can use to help me learn php programming ?
http://www.w3schools.com/php/default.asp
http://www.learnphpfree.com/
http://www.php-learn-it.com/
http://www.phpfreaks.com/
it teach php
http://www.php.net/ for all kind of documentary
http://www.easyphp.org/ ( you download it on your PC you will have php installed with mysql and phpmyadmin with Apache server)
http://www.opensourcecms.com/ ( you can find CMS for free as well)
Is it possible to use PHP or HTML to open and create a MS Word template that has been pre-created? How?
I am building a website where the user who enters the site will have the ability to fill out a form online. I would like the user to have the ability to download this form directly into a MS Word template that I create to use as the standard form. The website is written using PHP and MY SQL, so is it possible for the user once they have finished the form to click on a button "download to word" and then the information they fill out is automatically put in a Word template to be saved as a word doc on their computer? If this is possible can you tell me how? thank you!
Is it possible to use PHP or HTML to open and create a MS Word template that has been pre-created? How?
It might be possible. Check this out:
http://www.phpbuilder.com/columns/yunus2...
Reply:There doesn't seem to be anything in the php manual about manipulating Word documents/templates.
However, you can create a pdf, and that would be available to Apple users and users without Word (like me).
I've never done this myself, but there's lots of functions in the php manual, which you can get here:
http://www.php.net/download-docs.php
Reply:This is totally the wrong approach. Build a web page as the form, then use the post information from the form to populate the mysql data. You can then build another web page including their data and display it for them to print or save as they wish.
Is it possible to use PHP or HTML to open and create a MS Word template that has been pre-created? How?
It might be possible. Check this out:
http://www.phpbuilder.com/columns/yunus2...
Reply:There doesn't seem to be anything in the php manual about manipulating Word documents/templates.
However, you can create a pdf, and that would be available to Apple users and users without Word (like me).
I've never done this myself, but there's lots of functions in the php manual, which you can get here:
http://www.php.net/download-docs.php
Reply:This is totally the wrong approach. Build a web page as the form, then use the post information from the form to populate the mysql data. You can then build another web page including their data and display it for them to print or save as they wish.
Is there any software that I can use to build a PHP-MYSQL database without knowing programming?
Hopefully it will be a free solution. I dont have a big budget to work with, or time to go learn programming now.
Please help!
Is there any software that I can use to build a PHP-MYSQL database without knowing programming?
Try Macromedia DreamWeaver.
it's good.
stamen
Please help!
Is there any software that I can use to build a PHP-MYSQL database without knowing programming?
Try Macromedia DreamWeaver.
it's good.
stamen
How do I increment next 90 days or 3 months in current date using PHP?
I want to develop PHP code, which displays the date coming next to 90 days and/or 3 months.
Please code it in PHP,
Thanks
How do I increment next 90 days or 3 months in current date using PHP?
strtotime('+90 days');
strtotime('+3 months');
That function returns a unix time-stamp, so you could do it like this, for example:
echo date('jS M Y', strtotime('+3 months'));
Adam @ http://www.talkphp.com/
Reply:Im not sure of the question. please be more specific
Reply:My husband says try www.w3schools.com
SP.
Please code it in PHP,
Thanks
How do I increment next 90 days or 3 months in current date using PHP?
strtotime('+90 days');
strtotime('+3 months');
That function returns a unix time-stamp, so you could do it like this, for example:
echo date('jS M Y', strtotime('+3 months'));
Adam @ http://www.talkphp.com/
Reply:Im not sure of the question. please be more specific
Reply:My husband says try www.w3schools.com
SP.
How do I insert data into a PHP form from another page?
I have an online application form that I want to use, and have job adverts appearing on other pages. I have no knowledge in PHP, so my application form came from an online source.
If I click a link to apply for the job online, how can I insert the job reference number, job title and closing date into the PHP form automatically? I have seen how to do it, but can't remember where.
How do I insert data into a PHP form from another page?
For this type of web page you will usually be storing the job information on the server in some form of database.
When you link to the form page you will probably be passing a parameter of the job reference number like
formpage.php?refno=12345
The Form page will therefore have the job reference number and can retrieve all the information that it needs to fill in the form.
Reply:1. Your HTML form must call a php page (a file with an extention php), and written in php. i.e.:
%26lt;form name=blabla action=useform.php method=POST%26gt;
%26lt;input name=firstname value=""%26gt;
%26lt;/form%26gt;
2. Your file "useform.php" will then use the data received by POST.
You can get all the values posted with:
%26lt;?php
while(list($name,$value) = each($_POST))
$$name=$value;
// or
print_r ($_POST);
?%26gt;
To use the data "passed" by the form to PhP, just echo it:
%26lt;?php
echo ("Firstname: " . $firstname . "%26lt;br%26gt;");
?%26gt;
This will show "[firstname] =%26gt; what-you-enter-in-the-field"
The name of the field will become $firstname in PhP.
Plenty of forms and examples at www.php.net (the official site of PhP).
PS: don't use these b***y pre-made forms! It is totally amateurish (and visible to any professional).
Reply:Somewhere in your page you'll be outputting the html tags that are these fields
%26lt;input type='text' name='job_ref'%26gt;
you need to modify these to include the php variables you are storing this data in.
%26lt;input type='text' name='job_ref' value='%26lt;?php echo $your_job_ref_var_name ?%26gt;'%26gt;
Obviously this approach gets a little painful after a while.
If you don't know php, then you need to take a quick crash course, this will help you:
http://www.php.net/manual/en/language.va...
http://www.php.net/manual/en/language.va...
http://au3.php.net/manual/en/function.ec...
If I click a link to apply for the job online, how can I insert the job reference number, job title and closing date into the PHP form automatically? I have seen how to do it, but can't remember where.
How do I insert data into a PHP form from another page?
For this type of web page you will usually be storing the job information on the server in some form of database.
When you link to the form page you will probably be passing a parameter of the job reference number like
formpage.php?refno=12345
The Form page will therefore have the job reference number and can retrieve all the information that it needs to fill in the form.
Reply:1. Your HTML form must call a php page (a file with an extention php), and written in php. i.e.:
%26lt;form name=blabla action=useform.php method=POST%26gt;
%26lt;input name=firstname value=""%26gt;
%26lt;/form%26gt;
2. Your file "useform.php" will then use the data received by POST.
You can get all the values posted with:
%26lt;?php
while(list($name,$value) = each($_POST))
$$name=$value;
// or
print_r ($_POST);
?%26gt;
To use the data "passed" by the form to PhP, just echo it:
%26lt;?php
echo ("Firstname: " . $firstname . "%26lt;br%26gt;");
?%26gt;
This will show "[firstname] =%26gt; what-you-enter-in-the-field"
The name of the field will become $firstname in PhP.
Plenty of forms and examples at www.php.net (the official site of PhP).
PS: don't use these b***y pre-made forms! It is totally amateurish (and visible to any professional).
Reply:Somewhere in your page you'll be outputting the html tags that are these fields
%26lt;input type='text' name='job_ref'%26gt;
you need to modify these to include the php variables you are storing this data in.
%26lt;input type='text' name='job_ref' value='%26lt;?php echo $your_job_ref_var_name ?%26gt;'%26gt;
Obviously this approach gets a little painful after a while.
If you don't know php, then you need to take a quick crash course, this will help you:
http://www.php.net/manual/en/language.va...
http://www.php.net/manual/en/language.va...
http://au3.php.net/manual/en/function.ec...
What's the best way to edit PHP files to customise existing files to my own templates?
I have some very basic HTML skills but I've put these on a back-burner in recent years and done what little web site coding I've needed to do in Dreamweaver.
Lately I've been working with some open source code which pulls information from a MYSQL database but the PHP files used are very basic. I'd like to adapt these files to fit in with my website's basic template but don't know how to edit the PHP. I'd like a nice simple way, in something like Dreamweaver where I can just cut the existing tables from the old document, drop them into the relevant section of my site and then just save it.
Can anyone explain the easiest way for me please?
What's the best way to edit PHP files to customise existing files to my own templates?
Dreamweaver has support for templates, but I don't think you'd find the system it uses intuitive or helpful.
Most Web sites are laid out as a template. There are common header items and tags and common footer items and tags; content tends to go to the same place.
Common header items:
%26lt;html%26gt;
%26lt;head%26gt;
%26lt;title%26gt;Basic Page%26lt;/title%26gt;
%26lt;/head%26gt;
%26lt;body%26gt;
%26lt;table%26gt;
%26lt;tr%26gt;
%26lt;td colspan="3"%26gt;%26lt;h1%26gt;My Web Site%26lt;/h1%26gt;%26lt;/td%26gt;
%26lt;/tr%26gt;
%26lt;tr%26gt;
%26lt;td%26gt;This is a navigation pane%26lt;/td%26gt;
%26lt;td width="10"%26gt; %26lt;/td%26gt;
Typically, content will appear in another table cell:
%26lt;td%26gt;Page-specific content%26lt;/td%26gt;
Common footer items:
%26lt;/tr%26gt;
%26lt;/table%26gt;
%26lt;p%26gt;Copyright © 2006 Me, Myself %26amp; I. All rights reserved.%26lt;/p%26gt;
%26lt;/body%26gt;
%26lt;/html%26gt;
Therefore, you can split each page into three parts: A common header file, a common footer file, and the page itself. You just include the header and footer content on the page.
For including pages, I prefer the PHP function require_once(), which serves to resolve conflicts between included variables and functions:
Here is an index page, for example, using the header and footer content noted above saved as their own PHP pages:
%26lt;? require_once("header.inc.php"); ?%26gt;
%26lt;td%26gt;
%26lt;h3%26gt;Here is a test page%26lt;/h3%26gt;
%26lt;p%26gt;This is my super-special test page. I hope you like it!%26lt;/p%26gt;
%26lt;/td%26gt;
%26lt;? require_once("footer.inc.php"); ?%26gt;
Using this method, you can change content as you like, but keep the same look and feel for each page; changes to look and feel made one place apply to all pages using the includes.
Reply:I normally code in asp.net/asp/vb, and it was easy for me to intergrate with the html. Why don't you use the code viewer or whatever dreamweaver has and start your layout, and then go to the php file and copy the particular code you need and stick it between the two tables on the html page? ASP.net allows for separation of code from the visual part... it's worth learning.
Reply:I think first we need to clarify what is meant by template.
First, there are Dreamweaver templates. These reside in Dreamweaver ONLY and never make it onto the website. Because what is REALLY happening is that when you modify a template, then each and every file that uses that template gets modified and then published.
Then you have server-side templates. In a PHP-based site that can mean one of two things...
1) Files that are primarily HTML with elements that you want to include on multiple pages, such as the header, footer, navbar, etc. Then, where you want the invidual pages to go, you've got a php line that looks something like this...
%26lt;?php include('thispage.htm'); ?%26gt;
or
%26lt;?php require('thispage.php'); ?%26gt;
The latter will display an error message if the specified file could not be opened.
2) Then you have PHP-based templating solutions like Smarty, where PHP code is seperated from page design, in the classic design pattern called MVC (Model-View-Controller). In a nutshell, the database is the model, the Smarty template is the View, and the PHP code binding it all together is the Controller.
Well now that I've confused everyone, in a nutshell...
PHP files are best opened in Code View, and if you're going to be cutting and pasting tables you should become familiar with working in that mode.
To test PHP code "live" and be able to preview, your site needs to be set to use PHP.
"Site" menu =%26gt; "Manage Sites"
Pick a site from the list =%26gt; "Edit" button
Click "Testing Server" in the "Category" list
Where it says "Server Model" select "PHP MySQL"
Where it says "Access" select FTP
(unless you're running a local web AND SQL server)
Lately I've been working with some open source code which pulls information from a MYSQL database but the PHP files used are very basic. I'd like to adapt these files to fit in with my website's basic template but don't know how to edit the PHP. I'd like a nice simple way, in something like Dreamweaver where I can just cut the existing tables from the old document, drop them into the relevant section of my site and then just save it.
Can anyone explain the easiest way for me please?
What's the best way to edit PHP files to customise existing files to my own templates?
Dreamweaver has support for templates, but I don't think you'd find the system it uses intuitive or helpful.
Most Web sites are laid out as a template. There are common header items and tags and common footer items and tags; content tends to go to the same place.
Common header items:
%26lt;html%26gt;
%26lt;head%26gt;
%26lt;title%26gt;Basic Page%26lt;/title%26gt;
%26lt;/head%26gt;
%26lt;body%26gt;
%26lt;table%26gt;
%26lt;tr%26gt;
%26lt;td colspan="3"%26gt;%26lt;h1%26gt;My Web Site%26lt;/h1%26gt;%26lt;/td%26gt;
%26lt;/tr%26gt;
%26lt;tr%26gt;
%26lt;td%26gt;This is a navigation pane%26lt;/td%26gt;
%26lt;td width="10"%26gt; %26lt;/td%26gt;
Typically, content will appear in another table cell:
%26lt;td%26gt;Page-specific content%26lt;/td%26gt;
Common footer items:
%26lt;/tr%26gt;
%26lt;/table%26gt;
%26lt;p%26gt;Copyright © 2006 Me, Myself %26amp; I. All rights reserved.%26lt;/p%26gt;
%26lt;/body%26gt;
%26lt;/html%26gt;
Therefore, you can split each page into three parts: A common header file, a common footer file, and the page itself. You just include the header and footer content on the page.
For including pages, I prefer the PHP function require_once(), which serves to resolve conflicts between included variables and functions:
Here is an index page, for example, using the header and footer content noted above saved as their own PHP pages:
%26lt;? require_once("header.inc.php"); ?%26gt;
%26lt;td%26gt;
%26lt;h3%26gt;Here is a test page%26lt;/h3%26gt;
%26lt;p%26gt;This is my super-special test page. I hope you like it!%26lt;/p%26gt;
%26lt;/td%26gt;
%26lt;? require_once("footer.inc.php"); ?%26gt;
Using this method, you can change content as you like, but keep the same look and feel for each page; changes to look and feel made one place apply to all pages using the includes.
Reply:I normally code in asp.net/asp/vb, and it was easy for me to intergrate with the html. Why don't you use the code viewer or whatever dreamweaver has and start your layout, and then go to the php file and copy the particular code you need and stick it between the two tables on the html page? ASP.net allows for separation of code from the visual part... it's worth learning.
Reply:I think first we need to clarify what is meant by template.
First, there are Dreamweaver templates. These reside in Dreamweaver ONLY and never make it onto the website. Because what is REALLY happening is that when you modify a template, then each and every file that uses that template gets modified and then published.
Then you have server-side templates. In a PHP-based site that can mean one of two things...
1) Files that are primarily HTML with elements that you want to include on multiple pages, such as the header, footer, navbar, etc. Then, where you want the invidual pages to go, you've got a php line that looks something like this...
%26lt;?php include('thispage.htm'); ?%26gt;
or
%26lt;?php require('thispage.php'); ?%26gt;
The latter will display an error message if the specified file could not be opened.
2) Then you have PHP-based templating solutions like Smarty, where PHP code is seperated from page design, in the classic design pattern called MVC (Model-View-Controller). In a nutshell, the database is the model, the Smarty template is the View, and the PHP code binding it all together is the Controller.
Well now that I've confused everyone, in a nutshell...
PHP files are best opened in Code View, and if you're going to be cutting and pasting tables you should become familiar with working in that mode.
To test PHP code "live" and be able to preview, your site needs to be set to use PHP.
"Site" menu =%26gt; "Manage Sites"
Pick a site from the list =%26gt; "Edit" button
Click "Testing Server" in the "Category" list
Where it says "Server Model" select "PHP MySQL"
Where it says "Access" select FTP
(unless you're running a local web AND SQL server)
How do i stream my webcam to an ASP or PHP page for others to view?
I am looking at making a small video conferencing webpage for my own use. How do i get the ASP page to show my webcam?
How do i stream my webcam to an ASP or PHP page for others to view?
http://sourceforge.net/projects/uwcp/
http://sourceforge.net/projects/uwcp/
http://sourceforge.net/search/?type_of_s...
sim cards
How do i stream my webcam to an ASP or PHP page for others to view?
http://sourceforge.net/projects/uwcp/
http://sourceforge.net/projects/uwcp/
http://sourceforge.net/search/?type_of_s...
sim cards
Can someone please tell me where can i get a good php tutorial? one that start from the beigning?
hello, well im looking for a good way to lern php form the begining like a step by step tutorial.
Can someone please tell me where can i get a good php tutorial? one that start from the beigning?
PHP stands for “PHP: Hypertext Pre-processor.” It is an alternative to Microsoft's Active Server Pages (ASP).
I would suggest that you go through at least three different basic PHP on-line tutorials. Each writer has his/her own style and layout. Furthermore, each student has his/her own preference as to material and explanations. By going through three tutorials, you will have overlapping information that reinforces your knowledge and acquired expertise. In addition, some sites will have information that the others do not, or may explain somethings in a more understandable way.
I would also strongly recommend that you get a couple of ...For Dummies, ...Made Easy, Teach Yourself...in 21 Days books (from your local library or bookstore).
For on-line tutorials, you can google these three terms together:
PHP tutorial free
--------------------------------------...
Explore various sites, until you find three or four whose style, content, and setup are to your liking.
Here are three links:
http://www.freewebmasterhelp.com/tutoria...
http://mgeisler.net/php-tutorial/
http://www.htmlgoodies.com/beyond/php/ar...
Good luck.
Reply:Tizag seems like a good tutorial, I've used it as a reference many times. here: http://www.tizag.com/phpT/
And for NeeraJ, PHP stands for PHP Hypertext Preprocessor which stands for Personal Home Page Hypertext Preprocessor, I think. It's a server-side scripting language widely used in web pages.
Reply:what does that stand for can you please give me the full form
Can someone please tell me where can i get a good php tutorial? one that start from the beigning?
PHP stands for “PHP: Hypertext Pre-processor.” It is an alternative to Microsoft's Active Server Pages (ASP).
I would suggest that you go through at least three different basic PHP on-line tutorials. Each writer has his/her own style and layout. Furthermore, each student has his/her own preference as to material and explanations. By going through three tutorials, you will have overlapping information that reinforces your knowledge and acquired expertise. In addition, some sites will have information that the others do not, or may explain somethings in a more understandable way.
I would also strongly recommend that you get a couple of ...For Dummies, ...Made Easy, Teach Yourself...in 21 Days books (from your local library or bookstore).
For on-line tutorials, you can google these three terms together:
PHP tutorial free
--------------------------------------...
Explore various sites, until you find three or four whose style, content, and setup are to your liking.
Here are three links:
http://www.freewebmasterhelp.com/tutoria...
http://mgeisler.net/php-tutorial/
http://www.htmlgoodies.com/beyond/php/ar...
Good luck.
Reply:Tizag seems like a good tutorial, I've used it as a reference many times. here: http://www.tizag.com/phpT/
And for NeeraJ, PHP stands for PHP Hypertext Preprocessor which stands for Personal Home Page Hypertext Preprocessor, I think. It's a server-side scripting language widely used in web pages.
Reply:what does that stand for can you please give me the full form
How do I show spaces in my printed results for php?
I am trying to print out a sentence using this php code:
%26lt;?
$myArray=array("The", "quick", "brown", "fox", "jumped",
"over", "the", "lazy", "dog");
$numElements=count($myArray);
for($counter=0; $counter%26lt;$numElements; $counter++)
{print ($myArray[$counter]); }
?%26gt;
When I check the results the words are pushed together without spaces how do I show spaces in my results?
Thanks
How do I show spaces in my printed results for php?
hi. for me i do not usually use a space i use a tab which can be inputted by the keys "\t" without the "" yups. hope that helps ((:
Reply:Another way to do this would be the implode function that converts the array to a string with a space or whatever you want separating the array values...
$myString = implode(' ',$myArray);
print $myString;
Reply:%26lt;?php
$myArray=array("The", "quick", "brown", "fox", "jumped",
"over", "the", "lazy", "dog");
$numElements=count($myArray);
for($counter=0; $counter%26lt;$numElements; $counter++)
{print ($myArray[$counter].' '); }
?%26gt;
%26lt;?
$myArray=array("The", "quick", "brown", "fox", "jumped",
"over", "the", "lazy", "dog");
$numElements=count($myArray);
for($counter=0; $counter%26lt;$numElements; $counter++)
{print ($myArray[$counter]); }
?%26gt;
When I check the results the words are pushed together without spaces how do I show spaces in my results?
Thanks
How do I show spaces in my printed results for php?
hi. for me i do not usually use a space i use a tab which can be inputted by the keys "\t" without the "" yups. hope that helps ((:
Reply:Another way to do this would be the implode function that converts the array to a string with a space or whatever you want separating the array values...
$myString = implode(' ',$myArray);
print $myString;
Reply:%26lt;?php
$myArray=array("The", "quick", "brown", "fox", "jumped",
"over", "the", "lazy", "dog");
$numElements=count($myArray);
for($counter=0; $counter%26lt;$numElements; $counter++)
{print ($myArray[$counter].' '); }
?%26gt;
How to use PHP to input text inside a textarea on a web page?
I want to place a string of text into another textarea on a webpage. for example, I want a textarea to say "Hi" when i press a button in a PHP form. Does this make sense?
How to use PHP to input text inside a textarea on a web page?
Just check if a post variable has been set and echo the content. e.g:
echo '%26lt;textarea%26gt;',(is_array($_POST) ? 'Hi' : ''),'%26lt;/textarea%26gt;';
How to use PHP to input text inside a textarea on a web page?
Just check if a post variable has been set and echo the content. e.g:
echo '%26lt;textarea%26gt;',(is_array($_POST) ? 'Hi' : ''),'%26lt;/textarea%26gt;';
Which is the best free hosting website that supports pHp pages?
I want to upload that i have already made the material.
Which is the best free hosting website that supports pHp pages?
Yup, try this place
http://www.000webhost.com/?id=22952
It gives you:
*** 250 MB of disk space
*** 100 GB of data transfer
*** PHP and MySQL support with no restrictions
*** cPanel control panel
*** Absolutely no advertising!
Reply:you may try http://www.domaincheck.net
It support php, asp, asp.net, CF, cgi.....
Domain Names
.info Only $1.99
.org Only $6.99
.cc only $19.9,
.COMs starting at $9.95!*,
FREE with every domain: See Details
FREE! 10GB Disk Space Free Web Hosting, 300 GB Bandwidth
FREE! 1X200MB MSSQL
FREE! 10 MySQL
FREE! Online Photo Filer
FREE! Blog
FREE! 100MB Complete Email
FREE! Forwarding / Masking
FREE! Change of Registration
FREE! Starter Web Page
FREE! "For Sale"/ Parked Page
FREE! Domain Name Locking
FREE! Total DNS Control
Reply:You're making website for adsense , right blogs instead at hubpages !
http://tinyurl.com/24mof4
http://hubpages.com/_3oojls3ro4p4l/hub/H...
http://hubpages.com/_3oojls3ro4p4l/hub/T...
Reply:hi,
i suggest this:
http://000webhost.com
it also comes with cpanel
cheers!
garden ridge
Which is the best free hosting website that supports pHp pages?
Yup, try this place
http://www.000webhost.com/?id=22952
It gives you:
*** 250 MB of disk space
*** 100 GB of data transfer
*** PHP and MySQL support with no restrictions
*** cPanel control panel
*** Absolutely no advertising!
Reply:you may try http://www.domaincheck.net
It support php, asp, asp.net, CF, cgi.....
Domain Names
.info Only $1.99
.org Only $6.99
.cc only $19.9,
.COMs starting at $9.95!*,
FREE with every domain: See Details
FREE! 10GB Disk Space Free Web Hosting, 300 GB Bandwidth
FREE! 1X200MB MSSQL
FREE! 10 MySQL
FREE! Online Photo Filer
FREE! Blog
FREE! 100MB Complete Email
FREE! Forwarding / Masking
FREE! Change of Registration
FREE! Starter Web Page
FREE! "For Sale"/ Parked Page
FREE! Domain Name Locking
FREE! Total DNS Control
Reply:You're making website for adsense , right blogs instead at hubpages !
http://tinyurl.com/24mof4
http://hubpages.com/_3oojls3ro4p4l/hub/H...
http://hubpages.com/_3oojls3ro4p4l/hub/T...
Reply:hi,
i suggest this:
http://000webhost.com
it also comes with cpanel
cheers!
garden ridge
How to compile PHP with Imap, GD and mysql on a 64bit AMD machine?
How do I install PHP 4, imap, GD and mysql with Apache 2.0 on a 64 bit amd machine running RHEL 4 Nahant.
I've tried a few ways, compiling from src and thru rpm, but the imap always fails - gives a segmentation fault when run from command line.
No, i have not compiled the support in as well as loaded as a dynamic module.
Any help given will be useful
How to compile PHP with Imap, GD and mysql on a 64bit AMD machine?
Did you see any errors when running make?
Your segmentation error may mean you have a missing module dependency.
I've found that even when the modules look present, when I view the file it's got the right name but empty and I've had to copy the file from other locations.
I've tried a few ways, compiling from src and thru rpm, but the imap always fails - gives a segmentation fault when run from command line.
No, i have not compiled the support in as well as loaded as a dynamic module.
Any help given will be useful
How to compile PHP with Imap, GD and mysql on a 64bit AMD machine?
Did you see any errors when running make?
Your segmentation error may mean you have a missing module dependency.
I've found that even when the modules look present, when I view the file it's got the right name but empty and I've had to copy the file from other locations.
How do I create an "Exit" page for a php script doing registrations and logins?
Basically I have the db setup, the php registration script working. Now I need to figure out how to refer a user to a specific page once the registration/login is complete. Anyone out there able to help?
How do I create an "Exit" page for a php script doing registrations and logins?
Use the header redirect
header ("Location: whateveryourpagetilteis.php")
exit;
Put the exit there so nothing will execute after the redirect. You can use a full URL or a direct relative path to the page. You can also use Java Script to do it:
%26lt;SCRIPT%26gt;
window.location="whateveryourpagetilte...
%26lt;/SCRIPT%26gt;
or
echo "%26lt;SCRIPT%26gt;\n";
echo "window.location='whateveryourpagetiltei...
echo "%26lt;/SCRIPT%26gt;\n";
Reply:Text and a hyperlink can be used to refer a user to another page.
Reply:Ya, we can redirect one page from another page after the registration call the following function.
function exec_refresh()
{
window.status = "Redirecting..." + myvar;
myvar = myvar + " .";
var timerID = setTimeout("exec_refresh();",0);
// 0 means the time to redirect
if (timeout %26gt; 0)
{
timeout -= 1;
}
else
{
clearTimeout(timerID);
window.status = "";
window.location ="./forum.php";
//location for the next page.
}
}
this function should be in the tag.
%26lt;script type="text/javascript"%26gt;
%26lt;/script%26gt;
//this should be in head tag
calling block
%26lt;script%26gt;"exec_refresh();%26lt;/script%26gt;
//this should be in body tag.
How do I create an "Exit" page for a php script doing registrations and logins?
Use the header redirect
header ("Location: whateveryourpagetilteis.php")
exit;
Put the exit there so nothing will execute after the redirect. You can use a full URL or a direct relative path to the page. You can also use Java Script to do it:
%26lt;SCRIPT%26gt;
window.location="whateveryourpagetilte...
%26lt;/SCRIPT%26gt;
or
echo "%26lt;SCRIPT%26gt;\n";
echo "window.location='whateveryourpagetiltei...
echo "%26lt;/SCRIPT%26gt;\n";
Reply:Text and a hyperlink can be used to refer a user to another page.
Reply:Ya, we can redirect one page from another page after the registration call the following function.
function exec_refresh()
{
window.status = "Redirecting..." + myvar;
myvar = myvar + " .";
var timerID = setTimeout("exec_refresh();",0);
// 0 means the time to redirect
if (timeout %26gt; 0)
{
timeout -= 1;
}
else
{
clearTimeout(timerID);
window.status = "";
window.location ="./forum.php";
//location for the next page.
}
}
this function should be in the tag.
%26lt;script type="text/javascript"%26gt;
%26lt;/script%26gt;
//this should be in head tag
calling block
%26lt;script%26gt;"exec_refresh();%26lt;/script%26gt;
//this should be in body tag.
What are the best php tutorial sites and forums for a beginer like me?
I would like to know where on the internet i could get free php scripts and tutorials as well as a forum because i just started php very recently and i need some good scripts to work with. Please can anyone put me through to some nice websites where i can get these various items of information.
Cheers for your anticipated help dudes and dudesses. lol
What are the best php tutorial sites and forums for a beginer like me?
Seriously.. php.net
Also, never hurts to take a script or two from hotscripts.com and disect it. This is what I do for a living now.. Never went to school, no degree in computer science or development.
Always better to learn while doing ;)
Reply:Dude, just go to http://www.php.net
Cheers for your anticipated help dudes and dudesses. lol
What are the best php tutorial sites and forums for a beginer like me?
Seriously.. php.net
Also, never hurts to take a script or two from hotscripts.com and disect it. This is what I do for a living now.. Never went to school, no degree in computer science or development.
Always better to learn while doing ;)
Reply:Dude, just go to http://www.php.net
Php only working in some directories while using xampp?
Hi. I am trying to learn php and web design in general and i have been trying to install xampp. (apache, php, mysql, etc.). And when ever i run a php file it doesn't get run although html files do. The thing i cant figure out with it is how come the same file works when put in
C:\xampp\htdocs\xampp
but not when run from
C:\xampp\htdocs\gamemakerhelper
All help would be greatly appreciated.
Php only working in some directories while using xampp?
seem that you don't use the right path.
if you installed xampp as you said,check "httpd.conf" file in "c:\xampp\apache\conf" there are 2 options in that file:
(DocumentRoot,Directory), they both must have the value (C:\xampp\htdocs\) so when you type "http://localhost" in addrss bar in your internet browser, it will open the page "index.php" in "c:\xampp\htdocs\axmpp\"
and if you type "http://localhost/game/" you must have "index.php as example" in this path "c:\xampp\htdocs\xampp\game\"
you have touse relative address beginning with "http://localhost/"
Reply:check ur php.ini file on "doc_root", change it to the directory that you want.
flowers for algernon
C:\xampp\htdocs\xampp
but not when run from
C:\xampp\htdocs\gamemakerhelper
All help would be greatly appreciated.
Php only working in some directories while using xampp?
seem that you don't use the right path.
if you installed xampp as you said,check "httpd.conf" file in "c:\xampp\apache\conf" there are 2 options in that file:
(DocumentRoot,Directory), they both must have the value (C:\xampp\htdocs\) so when you type "http://localhost" in addrss bar in your internet browser, it will open the page "index.php" in "c:\xampp\htdocs\axmpp\"
and if you type "http://localhost/game/" you must have "index.php as example" in this path "c:\xampp\htdocs\xampp\game\"
you have touse relative address beginning with "http://localhost/"
Reply:check ur php.ini file on "doc_root", change it to the directory that you want.
flowers for algernon
Does anyone know where I can find a tutorial explaining how to upload a file with php?
I need to find a tutorial for uploading files with php, but I also need it to explain if there's a way to change the name of the file when uploading it.
Does anyone know where I can find a tutorial explaining how to upload a file with php?
http://www.tizag.com/phpT/fileupload.php
thinks its php5 based btw, check your webserver is up to date.
Does anyone know where I can find a tutorial explaining how to upload a file with php?
http://www.tizag.com/phpT/fileupload.php
thinks its php5 based btw, check your webserver is up to date.
Would PHP and MySQL be difficult for a teenager to learn?
I am interesting in learning PHP and MySQL, but I don't know how hard it would be to learn. Do you think I should try to learn the languages? Currently, I have little programing knowledge, though I know some Perl and Javascript. This year, though, I'm taking a computer science course, and we'll be learning QBasic. Then the next year I know I will learn C++ or Java.
Are there any books you would recommend to get me started?
Would PHP and MySQL be difficult for a teenager to learn?
PHP and MySQL are quite easy to master...
But I wont really say age is an issue, it will differ from person to person (some people are fast learners, some not), i've been coding since age 7 (million years ago) found it all quite easy...
Only way you'd know is if you give it a shot ;)
Reply:There were not such things like internet, PHP and MySQL when I was at your age; even not the personal computers! But I am sure I would learn anything if there were.
The simple answers to your question are both "yes, they are really hard!" and "no, they are just pieces of cake!" depends on a question which you should ask yourself and no one else:
"How much I am keen to learn these PHP and MySQL?"
The key answers is %26lt;%26lt;determination%26gt;%26gt; for sure.
Good luck.
Reply:Im 13, I use PHP and MySQL, but code little by myself, I read the PHP tutorial at w3schools.com, but mostly i use PHP and MySQL for forums, blogs, photo gallery's; I use these for this website I made for kids in my class, so we can talk, see pictures and more over the internet. Good luck!
Reply:for future-programmer like u, it will be easy (much easier than Java of course)
I have no programming base n learn via lotz of tutorial on net
Used to read a thick book with a word 'Bible' in its title
Reply:for a 14 years old person, yes, it is hard but as u know other languages too, its not applicable in ur case.
u can learn it, as u know the bases. I suggest u read the Beginning PHP 5 Book.
Are there any books you would recommend to get me started?
Would PHP and MySQL be difficult for a teenager to learn?
PHP and MySQL are quite easy to master...
But I wont really say age is an issue, it will differ from person to person (some people are fast learners, some not), i've been coding since age 7 (million years ago) found it all quite easy...
Only way you'd know is if you give it a shot ;)
Reply:There were not such things like internet, PHP and MySQL when I was at your age; even not the personal computers! But I am sure I would learn anything if there were.
The simple answers to your question are both "yes, they are really hard!" and "no, they are just pieces of cake!" depends on a question which you should ask yourself and no one else:
"How much I am keen to learn these PHP and MySQL?"
The key answers is %26lt;%26lt;determination%26gt;%26gt; for sure.
Good luck.
Reply:Im 13, I use PHP and MySQL, but code little by myself, I read the PHP tutorial at w3schools.com, but mostly i use PHP and MySQL for forums, blogs, photo gallery's; I use these for this website I made for kids in my class, so we can talk, see pictures and more over the internet. Good luck!
Reply:for future-programmer like u, it will be easy (much easier than Java of course)
I have no programming base n learn via lotz of tutorial on net
Used to read a thick book with a word 'Bible' in its title
Reply:for a 14 years old person, yes, it is hard but as u know other languages too, its not applicable in ur case.
u can learn it, as u know the bases. I suggest u read the Beginning PHP 5 Book.
How do I copy a web page (php) from the web?
I want to copy a webpage written in PHP from the web. The fact is that I want to copy the whole page before it is processed by the server. I don't have a FTP access to the server. How can this be done?
How do I copy a web page (php) from the web?
There is no-way for you to view/save the PHP source code if you dun have the FTP or SSH account.
If you using the above example,
you just saving the web-page after processed by PHP.
You can post your requirement and asking help from the experts in the world.
Reply:On a properly configured server, it cannot be done. Ever.
Reply:try something like this?
--------------------------------------...
%26lt;html%26gt;
%26lt;body%26gt;
%26lt;a href="http://something.com/stuff.php"%26gt;Cl... Here%26lt;/a%26gt;
%26lt;/body%26gt;
%26lt;/html%26gt;
--------------------------------------...
save and open it
right click
save as
...worth a try...
How do I copy a web page (php) from the web?
There is no-way for you to view/save the PHP source code if you dun have the FTP or SSH account.
If you using the above example,
you just saving the web-page after processed by PHP.
You can post your requirement and asking help from the experts in the world.
Reply:On a properly configured server, it cannot be done. Ever.
Reply:try something like this?
--------------------------------------...
%26lt;html%26gt;
%26lt;body%26gt;
%26lt;a href="http://something.com/stuff.php"%26gt;Cl... Here%26lt;/a%26gt;
%26lt;/body%26gt;
%26lt;/html%26gt;
--------------------------------------...
save and open it
right click
save as
...worth a try...
How to copy a directory to a new one using name from script in php?
i have a script in php that allows users to create a directory on my site, i tried the copy(); function doesnt work say directory all ready exist.i need it to take a directory and copy the files to the one just made. tried tons of diffent scripts so far none work.
How to copy a directory to a new one using name from script in php?
copy("fromdir/filename.txt", "todir/filename.txt");
If you want to move all files in a particular directory into another directory, you'll need to get all the files into an array and loop through them. Something like (untested!):
$copyfiles = glob("fromdir/*");
foreach ($copyfiles as $copyfile) {
copy($copyfile, "targetdir/".basename($copyfile));
}
business cards
How to copy a directory to a new one using name from script in php?
copy("fromdir/filename.txt", "todir/filename.txt");
If you want to move all files in a particular directory into another directory, you'll need to get all the files into an array and loop through them. Something like (untested!):
$copyfiles = glob("fromdir/*");
foreach ($copyfiles as $copyfile) {
copy($copyfile, "targetdir/".basename($copyfile));
}
business cards
How can I compare in PHP if a list of values are equal to a variable?
I need to simplify multiple comparisons in an if statement. For example instead of:
if ($variable == "First" || $variable == "Second" || $variable == "Third") ...
perhaps a biult-in function like this:
if (some_function($variable, "Fisrt", "Second", "Third")) ...
Is there any function to accomplish this?
How can I compare in PHP if a list of values are equal to a variable?
look up a function called in_array. bascially you create an array of all valid values and then run the in_array function
if ($variable == "First" || $variable == "Second" || $variable == "Third") ...
perhaps a biult-in function like this:
if (some_function($variable, "Fisrt", "Second", "Third")) ...
Is there any function to accomplish this?
How can I compare in PHP if a list of values are equal to a variable?
look up a function called in_array. bascially you create an array of all valid values and then run the in_array function
Can an interactive website with a client database be built using HTML,PHP and MySQL alone?
I mean a really functional website such as those that can send automatic reply email to visitor input, check the visitor's information against the database in the server etc.. Can such a website be built without something like Javascript? Will there be any defect if Javascript is not used in the coding?
Thank you in advance.
Can an interactive website with a client database be built using HTML,PHP and MySQL alone?
of course! it can be easily done without using javascript. You can make that application with PHP and HTML alone. There is a mail() function in PHP which allows you to send email from your server.
PHP is so easy and i love open source software. Be careful of spam though, because spammers may use your script to send spam email. You might want to implement CAPTCHA (automated image verification test) to prevent spammers.
Reply:I've written stuff before just using PHP and MySQL, should be enough for most things. As for e-mail, I set mine up to use the same e-mail server I used for my personal e-mail ( basically lifted the settings out of my Outlook configuration ) which isn't really an industrial strength solution, but works.
Javascript only really affects how the web pages react in the browser and in general it's better to try and not use it ( as users can turn it off at their own discretion ) but it can be useful to do minor bits of validation etc. at the users end before submitting a page back to your PHP code.
Reply:any form of email reply will require a mial server unless you rely on a web mail service. other than that, yes. an interactive dynamic site can be built with only HTML, SQL and PHP
Reply:use asp.net
or "Java".
u need not use javascript in the coding. u can use asp / asp.net to do most of validations
birthday cards
Thank you in advance.
Can an interactive website with a client database be built using HTML,PHP and MySQL alone?
of course! it can be easily done without using javascript. You can make that application with PHP and HTML alone. There is a mail() function in PHP which allows you to send email from your server.
PHP is so easy and i love open source software. Be careful of spam though, because spammers may use your script to send spam email. You might want to implement CAPTCHA (automated image verification test) to prevent spammers.
Reply:I've written stuff before just using PHP and MySQL, should be enough for most things. As for e-mail, I set mine up to use the same e-mail server I used for my personal e-mail ( basically lifted the settings out of my Outlook configuration ) which isn't really an industrial strength solution, but works.
Javascript only really affects how the web pages react in the browser and in general it's better to try and not use it ( as users can turn it off at their own discretion ) but it can be useful to do minor bits of validation etc. at the users end before submitting a page back to your PHP code.
Reply:any form of email reply will require a mial server unless you rely on a web mail service. other than that, yes. an interactive dynamic site can be built with only HTML, SQL and PHP
Reply:use asp.net
or "Java".
u need not use javascript in the coding. u can use asp / asp.net to do most of validations
birthday cards
How can i encrypt my php source code, using any free script (unlike IONCube).?
I just want basic protection, just a hard to read program. Maybe any software which converts a simple to read program to a really hard one?
How can i encrypt my php source code, using any free script (unlike IONCube).?
PHP codes were already parsed by the browser (IIS and Apache), so you don't need to encrypt it because, the return code for the users (to view your page) were converted to HTML code only..you don't need it.
Edit:
just try to give the idea (not the code)..
give them this link. http://www.planet-source-code.com
it helps a lot.
Reply:People can only see the output of the php code in their browser (html)
Reply:You can use Zend Guard which encrypts your code. The only downside is that you will need to have Zend installed on the server. But, I think most major hosting companies have Zend installed.
http://www.zend.com/en/products/guard/
OR, if you are crazy enough, replace all your variables with random strings and remove ALL whitespace. It won't stop someone from really taking your code, but it will prevent most or at least some "kiddie hackers" from hacking your code.
How can i encrypt my php source code, using any free script (unlike IONCube).?
PHP codes were already parsed by the browser (IIS and Apache), so you don't need to encrypt it because, the return code for the users (to view your page) were converted to HTML code only..you don't need it.
Edit:
just try to give the idea (not the code)..
give them this link. http://www.planet-source-code.com
it helps a lot.
Reply:People can only see the output of the php code in their browser (html)
Reply:You can use Zend Guard which encrypts your code. The only downside is that you will need to have Zend installed on the server. But, I think most major hosting companies have Zend installed.
http://www.zend.com/en/products/guard/
OR, if you are crazy enough, replace all your variables with random strings and remove ALL whitespace. It won't stop someone from really taking your code, but it will prevent most or at least some "kiddie hackers" from hacking your code.
Can someone please show me how to get a spreadsheet from a php form?
I want the results of a form to be displayed in a spreadsheet after the user selects submit. A tutorial would be nice or a site that offers a tutorial would be awesome as well.
Can someone please show me how to get a spreadsheet from a php form?
Edit: I found a more complicated example but I think it is what you are looking for:
http://www-128.ibm.com/developerworks/op...
You can put it into a CSV file and then open it in Excel. The problem is that you'll lose all your formatting, but it is a simple way to accomplish the task.
Setup a text file called "form.csv". In the first line of the file, put each column heading seperated by commas with NO spaces (,). Setup your form with the names of the form fields the same as the column headings in the exact same order as well. Then, press the enter key once. The file must be on the same directory as the script. Then, use this script to process the form and output the data to the file:
%26lt;?php
$body = "";
foreach($_POST as $field =%26gt; $value) {
$body .= "$value,";
}
$body .= "\n";
$fp = fopen("form.csv", "w");
fwrite($fp, $body);
fclose($fp);
?%26gt;
So, if you had form fields with the names "name", "email", and "comment", you would set up your CSV file like this:
name,email,comment
[Values will go here]
Hopefully, this should work out but I can't say that it will. Test this on your server to see if it works.
Reply:Tons of info here: http://www.google.com/search?q=php+excel...
Can someone please show me how to get a spreadsheet from a php form?
Edit: I found a more complicated example but I think it is what you are looking for:
http://www-128.ibm.com/developerworks/op...
You can put it into a CSV file and then open it in Excel. The problem is that you'll lose all your formatting, but it is a simple way to accomplish the task.
Setup a text file called "form.csv". In the first line of the file, put each column heading seperated by commas with NO spaces (,). Setup your form with the names of the form fields the same as the column headings in the exact same order as well. Then, press the enter key once. The file must be on the same directory as the script. Then, use this script to process the form and output the data to the file:
%26lt;?php
$body = "";
foreach($_POST as $field =%26gt; $value) {
$body .= "$value,";
}
$body .= "\n";
$fp = fopen("form.csv", "w");
fwrite($fp, $body);
fclose($fp);
?%26gt;
So, if you had form fields with the names "name", "email", and "comment", you would set up your CSV file like this:
name,email,comment
[Values will go here]
Hopefully, this should work out but I can't say that it will. Test this on your server to see if it works.
Reply:Tons of info here: http://www.google.com/search?q=php+excel...
How to take a screen shot of a webpage using php?
is there a way to take a screenshot of a web page using php, screen shots that are in alexa search, snap.com and ask.com search results.
if it can't be done directly using php, is there a way to use php to get the websites screen shots from other website that offer that service ?
How to take a screen shot of a webpage using php?
Hey mate
yes it's possible :)
Checkout this website which has a script that does just that: http://forums.digitalpoint.com/showthrea...
Reply:Sure it can be done in PHP in two easy steps.
1) Write a web browser in PHP
2) Save the image that it renders.
if it can't be done directly using php, is there a way to use php to get the websites screen shots from other website that offer that service ?
How to take a screen shot of a webpage using php?
Hey mate
yes it's possible :)
Checkout this website which has a script that does just that: http://forums.digitalpoint.com/showthrea...
Reply:Sure it can be done in PHP in two easy steps.
1) Write a web browser in PHP
2) Save the image that it renders.
How can I Install a php Nuke template to my site???
I want to learn how to install a template to my php nuke site??
How can I Install a php Nuke template to my site???
It is very easy. Put the template into the templates dir.
sepal
How can I Install a php Nuke template to my site???
It is very easy. Put the template into the templates dir.
sepal
How do I connect to a mySQL database using a PHP script?
I know how to read/write/change table values. I just need the initial connection info.
How do I connect to a mySQL database using a PHP script?
http://www.php-mysql-tutorial.com/connec...
Reply:http://localhost/phpmyadmin/
Is that what you mean?
Reply:It depends on what version of PHP you have.
If you are lucky, you have PHP 5.1+ that has PDO built in.
If you do, all you need to do is create a new PDO object:
$dbh = new PDO( 'mysql:host=localhost;dbname=test', $user, $pass);
if you aren't as lucky, you will need to use either the mysqli or mysql functions:
$dbh = mysqli_connect ( [string host [, string username [, string passwd [, string dbname [, int port [, string socket]]]]]] );
OR
$dbh = mysql_connect( 'mysql_host', 'mysql_user', 'mysql_password');
How do I connect to a mySQL database using a PHP script?
http://www.php-mysql-tutorial.com/connec...
Reply:http://localhost/phpmyadmin/
Is that what you mean?
Reply:It depends on what version of PHP you have.
If you are lucky, you have PHP 5.1+ that has PDO built in.
If you do, all you need to do is create a new PDO object:
$dbh = new PDO( 'mysql:host=localhost;dbname=test', $user, $pass);
if you aren't as lucky, you will need to use either the mysqli or mysql functions:
$dbh = mysqli_connect ( [string host [, string username [, string passwd [, string dbname [, int port [, string socket]]]]]] );
OR
$dbh = mysql_connect( 'mysql_host', 'mysql_user', 'mysql_password');
Thursday, July 30, 2009
What is PHP exactly when it comes to web design and why is it important?
programming language originally designed for producing dynamic web pages.[1] PHP is used mainly in server-side scripting, but can be used from a command line interface or in standalone graphical applications. Textual User Interfaces can also be created using ncurses. PHP is a recursive initialism for PHP: Hypertext Preprocessor.
The main implementation is produced by The PHP Group and released under the PHP License. This implementation serves to define a de facto standard for PHP, as there is no formal specification.
PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. PHP generally runs on a web server, taking PHP code as its input and creating Web pages as output. However, it can also be used for command-line scripting and client-side GUI applications. PHP can be deployed on most web servers and on almost every operating system and platform free of charge. The PHP Group also provides the complete source code for users to build, customize and extend for their own use.
PHP primarily acts as a filter. The PHP program takes input from a file or stream containing text and special PHP instructions and outputs another stream of data for display.
What is PHP exactly when it comes to web design and why is it important?
PHP is a programing language kind of like Java of C, but it (unlike Java and C) is able to be read by the browser itself without any outside attachments. This makes it more useful for building things of web pages that you need to load fast or when Java is not available. It also makes web pages smaller and makes them take up less bandwidth because you have to transfer less data then with a Java app.
Reply:Take a look at the wiki, it really explains it better then anyone.
http://en.wikipedia.org/wiki/PHP
php is not important as such, but in order to create a successfull website, you need to take advance of a program language to create that extra something.
The main implementation is produced by The PHP Group and released under the PHP License. This implementation serves to define a de facto standard for PHP, as there is no formal specification.
PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. PHP generally runs on a web server, taking PHP code as its input and creating Web pages as output. However, it can also be used for command-line scripting and client-side GUI applications. PHP can be deployed on most web servers and on almost every operating system and platform free of charge. The PHP Group also provides the complete source code for users to build, customize and extend for their own use.
PHP primarily acts as a filter. The PHP program takes input from a file or stream containing text and special PHP instructions and outputs another stream of data for display.
What is PHP exactly when it comes to web design and why is it important?
PHP is a programing language kind of like Java of C, but it (unlike Java and C) is able to be read by the browser itself without any outside attachments. This makes it more useful for building things of web pages that you need to load fast or when Java is not available. It also makes web pages smaller and makes them take up less bandwidth because you have to transfer less data then with a Java app.
Reply:Take a look at the wiki, it really explains it better then anyone.
http://en.wikipedia.org/wiki/PHP
php is not important as such, but in order to create a successfull website, you need to take advance of a program language to create that extra something.
I want a PHP Script in my website to run every day morning. How to achieve this?
Sort of cron job, I want a script or page in my website, which will run on specific time to get some log or visitor count etc.
FYI:
PHP crontabs is not supported in my web hosting.
I want a PHP Script in my website to run every day morning. How to achieve this?
You must change you're web hosting at first and sacand you can to doing this by php ... but how .. i can't to tell you how coz it will take alot of my time .. and i can't to doing something like that for free.
FYI:
PHP crontabs is not supported in my web hosting.
I want a PHP Script in my website to run every day morning. How to achieve this?
You must change you're web hosting at first and sacand you can to doing this by php ... but how .. i can't to tell you how coz it will take alot of my time .. and i can't to doing something like that for free.
How to write PHP code to create a hyperlink that opens in another window?
how would you write full php code to create a html hyperlink to a website that opens in another window such as yahoo.com?
How to write PHP code to create a hyperlink that opens in another window?
If you particularly want to write it in php (perhaps you are generating the link or something):
%26lt;?php
echo "%26lt;a href=\"the-url.com\" target=\"_blank\"%26gt;anchor text%26lt;/a%26gt;";
?%26gt;
But as stated above, you don't need to use php to do this.
Reply:Easy my friend:
Within an HTML context, read outside of php then just put write the link out. If inside PHP use an echo or print statement:
%26lt;? print( '%26lt;a href="http://mylink.com/path/"%26gt;click Moi%26lt;/a%26gt;'); ?%26gt;
mind you echo will be bad for performance when somany users click on that hyper link, so use print if you really have to.
also check out this resource:
http://uk2.php.net/manual/en/function.fr...
the one below is a specific example though,
Good luck
aurevoir
Reply:If you are referring to a link that will open in a completely new window, it would be like this in php:
%26lt;a href=\"http://www.yahoo.com\"%26gt;Yahoo%26lt;/a%26gt;
Now, depending on your php syntax you may need to wrap it with echo "%26lt;a href=\"http://www.yahoo.com\"%26gt;Yahoo%26lt;/a%26gt;"...
Reply:Hi there,
What you need is simply HTML, NOT PHP :)
%26lt;p%26gt;
Visit %26lt;a href="http://www.YAHOO.com" target="_blank"%26gt;Yahoo!%26lt;/a%26gt; today!
%26lt;/p%26gt;
The target="_blank" opens the link "Yahoo" in a new window.
Hope this helps,
Piet
printable cards
How to write PHP code to create a hyperlink that opens in another window?
If you particularly want to write it in php (perhaps you are generating the link or something):
%26lt;?php
echo "%26lt;a href=\"the-url.com\" target=\"_blank\"%26gt;anchor text%26lt;/a%26gt;";
?%26gt;
But as stated above, you don't need to use php to do this.
Reply:Easy my friend:
Within an HTML context, read outside of php then just put write the link out. If inside PHP use an echo or print statement:
%26lt;? print( '%26lt;a href="http://mylink.com/path/"%26gt;click Moi%26lt;/a%26gt;'); ?%26gt;
mind you echo will be bad for performance when somany users click on that hyper link, so use print if you really have to.
also check out this resource:
http://uk2.php.net/manual/en/function.fr...
the one below is a specific example though,
Good luck
aurevoir
Reply:If you are referring to a link that will open in a completely new window, it would be like this in php:
%26lt;a href=\"http://www.yahoo.com\"%26gt;Yahoo%26lt;/a%26gt;
Now, depending on your php syntax you may need to wrap it with echo "%26lt;a href=\"http://www.yahoo.com\"%26gt;Yahoo%26lt;/a%26gt;"...
Reply:Hi there,
What you need is simply HTML, NOT PHP :)
%26lt;p%26gt;
Visit %26lt;a href="http://www.YAHOO.com" target="_blank"%26gt;Yahoo!%26lt;/a%26gt; today!
%26lt;/p%26gt;
The target="_blank" opens the link "Yahoo" in a new window.
Hope this helps,
Piet
printable cards
What do i need to strat prgramming PHP on my PC?
What do i need to strat prgramming PHP on my PC?
What do i need to strat prgramming PHP on my PC?
download and install apache http server from http://httpd.apache.org/download.cgi then download and install php from http://www.php.net/downloads.php
i to have only just started scripting with php... its a great language to learn. good luck.
Reply:You can find more information at http://www.brugbart.com/?TID=6 - An Introduction to PHP
You do not need your own server, it can be quite a step to install your own server, and setup php + mysql, just to anable handling of same locally.
The easiest way for most beginners, would be to buy a domain name and some hosting space. There however is a clear advantage running your own server, since you don't need to spend time uploading your scripts before you can test them.
Running your own server could potentially lead to security risks, if setup wrong; or if you forget to secure one of your scripts.
If you really need the server, theres a guide at http://www.php-mysql-tutorial.com/instal... covering how to install both php and mysql with apache.
Reply:You will need a web server (eg Apache - httpd.apache.org) and PHP (php.net) to setup a test environment. MySQL (mysql.com) will also be useful, since primarily PHP is used to interact with a database.
You will probably need some help configuring them to work with each other - there are plenty of guides available on the net. It isn't an easy task to setup a web server with PHP and MySQL, but it's all part of the learning experience - no point learning a new language if you don't know how to setup its environment. It's also free - sure as hell beats paying for a domain name and web hosting that you're not going to use. It never ceases to amaze me when people spend all this money, and THEN ask for help learning HTML, CSS or whatever. What a waste...
Now that you have a test environment, you need development tools. That's pretty easy - PHP, like HTML, CSS etc, is simply a plain text format. So you will want a programmer's text editor (don't use Notepad). I use PSPad (pspad.com). You will also want to keep a link to the PHP reference handy - http://www.php.net/quickref.php
Since you are learning, you will want a tutorial - try W3Schools (http://www.w3schools.com/php/).
Reply:You will need:
Apache
PHP (from http://php.net)
Windows/Linux/Other Operating System
A SQL server like MYSQL
This is available in a package called: xampp
Get it from http://apachefriends.org
What do i need to strat prgramming PHP on my PC?
download and install apache http server from http://httpd.apache.org/download.cgi then download and install php from http://www.php.net/downloads.php
i to have only just started scripting with php... its a great language to learn. good luck.
Reply:You can find more information at http://www.brugbart.com/?TID=6 - An Introduction to PHP
You do not need your own server, it can be quite a step to install your own server, and setup php + mysql, just to anable handling of same locally.
The easiest way for most beginners, would be to buy a domain name and some hosting space. There however is a clear advantage running your own server, since you don't need to spend time uploading your scripts before you can test them.
Running your own server could potentially lead to security risks, if setup wrong; or if you forget to secure one of your scripts.
If you really need the server, theres a guide at http://www.php-mysql-tutorial.com/instal... covering how to install both php and mysql with apache.
Reply:You will need a web server (eg Apache - httpd.apache.org) and PHP (php.net) to setup a test environment. MySQL (mysql.com) will also be useful, since primarily PHP is used to interact with a database.
You will probably need some help configuring them to work with each other - there are plenty of guides available on the net. It isn't an easy task to setup a web server with PHP and MySQL, but it's all part of the learning experience - no point learning a new language if you don't know how to setup its environment. It's also free - sure as hell beats paying for a domain name and web hosting that you're not going to use. It never ceases to amaze me when people spend all this money, and THEN ask for help learning HTML, CSS or whatever. What a waste...
Now that you have a test environment, you need development tools. That's pretty easy - PHP, like HTML, CSS etc, is simply a plain text format. So you will want a programmer's text editor (don't use Notepad). I use PSPad (pspad.com). You will also want to keep a link to the PHP reference handy - http://www.php.net/quickref.php
Since you are learning, you will want a tutorial - try W3Schools (http://www.w3schools.com/php/).
Reply:You will need:
Apache
PHP (from http://php.net)
Windows/Linux/Other Operating System
A SQL server like MYSQL
This is available in a package called: xampp
Get it from http://apachefriends.org
What is PHP and what is it used for by web developers?
What is PHP and what is it used for by web developers?
What is PHP and what is it used for by web developers?
PHP (PHP: Hypertext Preprocessor) is a reflective programming language originally designed for producing dynamic Web pages. PHP is used mainly in server-side application software, but can be used from a command line interface or in standalone graphical applications. (From Wikipedia)
Basically, PHP is a programming language to create dynamic web pages and web applications that are run on a server and accessed through your browser.
Reply:php is a database langauge it is the magic of puttin somthing in a search box on a site hitting submit and getting a result
to get a little technical it is just a HTML like code but more concetrated and in database form
for example when you type in a phrase or question in the search box and hit submit , it sends a "query" and code gets executed and the program looks for matches and you get a result page
Now to be honest PHP is not the only database langauge out there....
there are quite a few
there is ASP which is made by Microsoft and then theres Perl, AJAX ,Ruby and CGI
They all perform the same function (Data Storage ,Retrieval and other database functions) , they just go about doing it in different ways and not to mention it is coded different
Think of it this way its all ice cream just different flavors
Reply:php is a server-side scripting language used commonly for content, forms, forums, chatting, etc. you can find info here: http://www.php.net and scripts here: http://php.resourceindex.com/
What is PHP and what is it used for by web developers?
PHP (PHP: Hypertext Preprocessor) is a reflective programming language originally designed for producing dynamic Web pages. PHP is used mainly in server-side application software, but can be used from a command line interface or in standalone graphical applications. (From Wikipedia)
Basically, PHP is a programming language to create dynamic web pages and web applications that are run on a server and accessed through your browser.
Reply:php is a database langauge it is the magic of puttin somthing in a search box on a site hitting submit and getting a result
to get a little technical it is just a HTML like code but more concetrated and in database form
for example when you type in a phrase or question in the search box and hit submit , it sends a "query" and code gets executed and the program looks for matches and you get a result page
Now to be honest PHP is not the only database langauge out there....
there are quite a few
there is ASP which is made by Microsoft and then theres Perl, AJAX ,Ruby and CGI
They all perform the same function (Data Storage ,Retrieval and other database functions) , they just go about doing it in different ways and not to mention it is coded different
Think of it this way its all ice cream just different flavors
Reply:php is a server-side scripting language used commonly for content, forms, forums, chatting, etc. you can find info here: http://www.php.net and scripts here: http://php.resourceindex.com/
How do I get my PHP program to connect with MySQL?
In datasource I use myodbc.dll in another language to connect to MySQL, I just don't know how in PHP. The username is ODBC. I currently have PHP running successfully with Xitami. I know MySQL is installed correctly because I'm using it with another programming language.
How do I get my PHP program to connect with MySQL?
You need to use the mysql_connect function to connect to the database
here is a sample Php script
$DBhost = "Your-MySQL-servers-IP-or-domainname";
$DBuser = "your user name";
$DBpass = "Your Password";
$DBName = "The Name of the Database";
$table = "Your Table";
mysql_connect($DBhost,$DBuser,$DBpass) or die("Unable toconnect to database");
@mysql_select_db("$DBName") or die("Unable to select database $DBName"); $sqlquery = "SELECT * FROM $table'";
$result = mysql_query($sqlquery);
$number = mysql_numrows($result);
where the $result would have your records and the $number has the count of the number of rows returned...
Reply:Use the mysql_pconnect function. You can read about it on php.net website.
How do I get my PHP program to connect with MySQL?
You need to use the mysql_connect function to connect to the database
here is a sample Php script
$DBhost = "Your-MySQL-servers-IP-or-domainname";
$DBuser = "your user name";
$DBpass = "Your Password";
$DBName = "The Name of the Database";
$table = "Your Table";
mysql_connect($DBhost,$DBuser,$DBpass) or die("Unable toconnect to database");
@mysql_select_db("$DBName") or die("Unable to select database $DBName"); $sqlquery = "SELECT * FROM $table'";
$result = mysql_query($sqlquery);
$number = mysql_numrows($result);
where the $result would have your records and the $number has the count of the number of rows returned...
Reply:Use the mysql_pconnect function. You can read about it on php.net website.
How can i code sockets in C#? Specifically im looking to send text data over port 80 to a php server.?
Opening TCP sockets will require knowledge of underlying HTTP protocols... use the HttpWebRequest class instead. Additionally, you need to know what you are sending text to. Usually, there will be an associated PHP script on the server which has a predefined set of information that it accepts. That data is sent in key/value pairs that looks very similar to the URL at the top of your browser above... somevariable=sometext%26amp;someothervar=somea...
love song lyrics
love song lyrics
(PHP/MySQL) How do I add new folder, with the username, when a user registers?
(PHP/MySQL) How do I add new folder, with the username, when a user registers?
(PHP/MySQL) How do I add new folder, with the username, when a user registers?
There are several ways to do this. Most sensible is using mkdir.
%26lt;?
$basepath = "/my/path/";
//code to create user account
//if user creation was successful, and $user = new folder name
if( mkdir( $basepath . $user ) ) {
echo "directory $basepath$user created";
}
?%26gt;
UPDATE:
There is nothing worse on Answers than someone who follows up a question with a criticism, then provides worse code.
In the code below, the user creates a directory based on a querystring parameter.
1. Anyone can now create whatever directories he wants to create on your server by simply calling the script and passing a new querystring parameter that contains the name of the directory he wants created.
2. To wreck your script and possibly crash your server, all a hacker has to do is poison the querystring parameter with a character he knows won't be accepted by the filesystem.
3. The user needs to know the HTTP relative path to his directory so he can link to it. If he doesn't know the directory path structure, he can't access resources in his directory.
Yes, it is inherently unsafe to provide upload access to a directory that is in your HTTP path:
http://www.dougv.com/blog/2007/06/10/the...
But this question says nothing about this.
I really wish that people would leave well enough alone on this board and not make fools of themselves by claiming something isn't right, when it is; and then introducing code that creates a whole new bunch of problems that need to be resolved.
Reply:That's a security vuln.
Use
%26lt;?php
$user = $_GET['user'];
if(mkdir("/var/".basename($user))) echo "Success.";
else "Error.";
?%26gt;
;)
(PHP/MySQL) How do I add new folder, with the username, when a user registers?
There are several ways to do this. Most sensible is using mkdir.
%26lt;?
$basepath = "/my/path/";
//code to create user account
//if user creation was successful, and $user = new folder name
if( mkdir( $basepath . $user ) ) {
echo "directory $basepath$user created";
}
?%26gt;
UPDATE:
There is nothing worse on Answers than someone who follows up a question with a criticism, then provides worse code.
In the code below, the user creates a directory based on a querystring parameter.
1. Anyone can now create whatever directories he wants to create on your server by simply calling the script and passing a new querystring parameter that contains the name of the directory he wants created.
2. To wreck your script and possibly crash your server, all a hacker has to do is poison the querystring parameter with a character he knows won't be accepted by the filesystem.
3. The user needs to know the HTTP relative path to his directory so he can link to it. If he doesn't know the directory path structure, he can't access resources in his directory.
Yes, it is inherently unsafe to provide upload access to a directory that is in your HTTP path:
http://www.dougv.com/blog/2007/06/10/the...
But this question says nothing about this.
I really wish that people would leave well enough alone on this board and not make fools of themselves by claiming something isn't right, when it is; and then introducing code that creates a whole new bunch of problems that need to be resolved.
Reply:That's a security vuln.
Use
%26lt;?php
$user = $_GET['user'];
if(mkdir("/var/".basename($user))) echo "Success.";
else "Error.";
?%26gt;
;)
How do you install PDFLib Lite on a Windows system using Apache and PHP?
I have looked at the Byzantine documentation, and not being a C programmer, cannot make sense of it.
How do you install PDFLib Lite on a Windows system using Apache and PHP?
1. Download and install PDFLib DLL from here:
http://pecl4win.php.net/ext.php/php_pdfl...
2. Place the DLL in the extensions folder for your PHP install. That folder was defined during your install and is listed in your php.ini file:
http://us.php.net/manual/en/ini.core.php...
3. Add the appropriate extension line to your php.ini file:
extension=php_pdflib.dll
4. Restart PHP / Apache.
The library should work after the web service restart.
How do you install PDFLib Lite on a Windows system using Apache and PHP?
1. Download and install PDFLib DLL from here:
http://pecl4win.php.net/ext.php/php_pdfl...
2. Place the DLL in the extensions folder for your PHP install. That folder was defined during your install and is listed in your php.ini file:
http://us.php.net/manual/en/ini.core.php...
3. Add the appropriate extension line to your php.ini file:
extension=php_pdflib.dll
4. Restart PHP / Apache.
The library should work after the web service restart.
How to make a php file work on a Site?
Hi
I would like to know exactly (and when I say exactly I mean step by step instructions) how to make a php file written in word, work on an internet server that uses Apache. The server isn’t mine so don’t come to me with the instructions written in the installation file of PHP. What I mean is how can make a php file execute once it has been loaded into a server. I tried to open it after I just uploaded it and it came up empty. It showed the script not the result of the script.
How to make a php file work on a Site?
If php isn't enabled and you don't have access to the Apache config file, then you're out of luck. To test, put the following in a text file (use Notepad or TextPad, not Word) named foo.php. Upload it to your web space and then navigate to it with your browser. If php is enabled, you should see all sorts of config information on the screen. If you don't, php is not enabled.
Good luck!
%26lt;html%26gt;%26lt;body%26gt;
%26lt;h1%26gt;PHP test%26lt;/h1%26gt;
%26lt;? phpinfo()?%26gt;
%26lt;/body%26gt;%26lt;/html%26gt;
I would like to know exactly (and when I say exactly I mean step by step instructions) how to make a php file written in word, work on an internet server that uses Apache. The server isn’t mine so don’t come to me with the instructions written in the installation file of PHP. What I mean is how can make a php file execute once it has been loaded into a server. I tried to open it after I just uploaded it and it came up empty. It showed the script not the result of the script.
How to make a php file work on a Site?
If php isn't enabled and you don't have access to the Apache config file, then you're out of luck. To test, put the following in a text file (use Notepad or TextPad, not Word) named foo.php. Upload it to your web space and then navigate to it with your browser. If php is enabled, you should see all sorts of config information on the screen. If you don't, php is not enabled.
Good luck!
%26lt;html%26gt;%26lt;body%26gt;
%26lt;h1%26gt;PHP test%26lt;/h1%26gt;
%26lt;? phpinfo()?%26gt;
%26lt;/body%26gt;%26lt;/html%26gt;
Is it possible to use a microsoft acess database in a website using PHP?
I currently use ASP but would like to learn PHP but still use MS Access since it's the only database I have.
Is it possible to use a microsoft acess database in a website using PHP?
It's better to migrate/convert your database to MySQL. PHP and MySQL love eachother :) Follow guide in link below.
Reply:yep
$conn=odbc_connect('northwind','','');
$sql="SELECT * FROM customers";
$rs=odbc_exec($conn,$sql);
Reply:Learn MySQL. It's free, and works great with PHP.
http://www.mysql.com/
greeting cards
Is it possible to use a microsoft acess database in a website using PHP?
It's better to migrate/convert your database to MySQL. PHP and MySQL love eachother :) Follow guide in link below.
Reply:yep
$conn=odbc_connect('northwind','','');
$sql="SELECT * FROM customers";
$rs=odbc_exec($conn,$sql);
Reply:Learn MySQL. It's free, and works great with PHP.
http://www.mysql.com/
greeting cards
How to find the URL of current page in PHP?
I am making a simple webpage with some parameters in PHP. My question is, when a user loads the webpage though any parameter passed, what is a simple way to get the url of the page in PHP. Thanks in advance!
How to find the URL of current page in PHP?
You can get the URI by using the following tag:
$_SERVER['REQUEST_URI'];
There for if the address is http://www.mysite.com/path/to/page, this value would return "/path/to/page".
If you have query string parameters, you can also get those in a similar fashion.
$_GET['page'];
For example, if your address is http://www.mysite.com?page=homepage the above would return "homepage"
Reply:Try
$_SERVER["PHP_SELF"]
Reply:If the page is loaded you don't need the url, you are there already. I think you need to explain.
How to find the URL of current page in PHP?
You can get the URI by using the following tag:
$_SERVER['REQUEST_URI'];
There for if the address is http://www.mysite.com/path/to/page, this value would return "/path/to/page".
If you have query string parameters, you can also get those in a similar fashion.
$_GET['page'];
For example, if your address is http://www.mysite.com?page=homepage the above would return "homepage"
Reply:Try
$_SERVER["PHP_SELF"]
Reply:If the page is loaded you don't need the url, you are there already. I think you need to explain.
How do I show a users name after they login in php?
I have a website and on the homepage after the user logs in, I want a text line that says "Welcome, %26lt;username%26gt;, you currently have %26lt;points%26gt; Points!"! I don't know how to retrieve the members current points field or username field from the database. I know how to get it, but how do I write it to automatically get only the person that is currently logged in's information?
How do I show a users name after they login in php?
// here is a basic code
// code above for authentication
// if authenticated
session_start();
// $name could be queried from the database
$_SESSION["user"] = $name;
header("Location:home.php");
exit;
///////////////
// home.php
$myname = $_SESSION['user'];
echo $myname
// hope that helps
// -keith
Reply:Here's how I would do it:
First, get the username and points information from the database, and store it in variables, like so:
$username = %26lt;DATABASE STUFF HERE%26gt;
$points = %26lt;DATABASE STUFF HERE%26gt;
Then, all you need to do is show that information to the user:
print "Welcome, ".$username;
print ", you currently have ".$points."!";
Now, for the exact database stuff, if you need all the details, feel free to email me at alexvillmann@gmail.com because all the connection stuff is really to long to post here.
Hope this helps some,
Alex
Reply:By running a query with the where set to the user's id, you must carry this through every page they visit anyway to control the security. I hope you have set some security.
How do I show a users name after they login in php?
// here is a basic code
// code above for authentication
// if authenticated
session_start();
// $name could be queried from the database
$_SESSION["user"] = $name;
header("Location:home.php");
exit;
///////////////
// home.php
$myname = $_SESSION['user'];
echo $myname
// hope that helps
// -keith
Reply:Here's how I would do it:
First, get the username and points information from the database, and store it in variables, like so:
$username = %26lt;DATABASE STUFF HERE%26gt;
$points = %26lt;DATABASE STUFF HERE%26gt;
Then, all you need to do is show that information to the user:
print "Welcome, ".$username;
print ", you currently have ".$points."!";
Now, for the exact database stuff, if you need all the details, feel free to email me at alexvillmann@gmail.com because all the connection stuff is really to long to post here.
Hope this helps some,
Alex
Reply:By running a query with the where set to the user's id, you must carry this through every page they visit anyway to control the security. I hope you have set some security.
How do I convert my windows XP Pro to work as a web server? I create PHP scripts for a website and to test.?
I need to test php scripts on my computer before uploading to a webhost. How can I make a web server that should work as I click a php link it should trigger the codes offline.
How do I convert my windows XP Pro to work as a web server? I create PHP scripts for a website and to test.?
Windows XP PRO has functionality for running a web server built in
IIS is an option, however, under a "Default" installation of XP Pro, it might not be installed
Control panel - %26gt; add / remove programs -%26gt; Add Remove Windows COmponents - Check "Internet Information Services"
You could also look @ apache as has been mentioned, however, IIS is PART of windows.
Reply:You will need to install a webserver on your computer such as Apache (http://httpd.apache.org/) and install php (http://www.php.net/) on your computer. You will then be able to run php scripts.
Reply:You will have to get the software to make your machine run as a webserver. It can get rather pricy.
How do I convert my windows XP Pro to work as a web server? I create PHP scripts for a website and to test.?
Windows XP PRO has functionality for running a web server built in
IIS is an option, however, under a "Default" installation of XP Pro, it might not be installed
Control panel - %26gt; add / remove programs -%26gt; Add Remove Windows COmponents - Check "Internet Information Services"
You could also look @ apache as has been mentioned, however, IIS is PART of windows.
Reply:You will need to install a webserver on your computer such as Apache (http://httpd.apache.org/) and install php (http://www.php.net/) on your computer. You will then be able to run php scripts.
Reply:You will have to get the software to make your machine run as a webserver. It can get rather pricy.
How can I connect from PHP script to an MS SQL Server Database?
My PHP scripts run in a FreeBSD Server and there's another Windows Server 2003 that host MS SQL Server Database.
How can I connect from PHP script to an MS SQL Server Database?
Install PHP Modules for MS SQL.
Reply:you need to have the FREETDS installed on your BSD box.
here's the link http://www.freetds.org/
and also download and install php-mssql module
flower arranging
How can I connect from PHP script to an MS SQL Server Database?
Install PHP Modules for MS SQL.
Reply:you need to have the FREETDS installed on your BSD box.
here's the link http://www.freetds.org/
and also download and install php-mssql module
flower arranging
Can you become a PHP programmer in 6 months with intensive study?
I was told 2 years but if I study hard can I make that in 6 months? I have some light html skills. Thanks.
Can you become a PHP programmer in 6 months with intensive study?
I certainly feel you can do it, PHP is the easiest language i have every come accross. If you have never done web programming before it will take a few days to understand the concepts of data submission AJAX and so on. PHP is not about studying, php hardly has a syntax, and google is best and fastest reference book you will find in the world. I know many people who were good php programmers in less than a month.
Reply:Absolutely. I learned mySQL, PHP Sessions, and XML in one school semester. We built an inventory web system with all three technologies. We also built a hangman game using AJAX.
It may hard to learn on your own. We had a teacher. But, we had to read our textbooks to write the systems. They just gave us hints on the types of constructs to use. You could easily find out how to implement AJAX online.
Reply:With the correct outline of learning, yes, this would be easy. If this is your FIRST programming language, I don't think so. Just remember--PHP/SQL, OOP, and get a ref. manual. You should be just fine.
Reply:2 years!!! There's books that teach you in 21 days (not consecutive). Compared to other programming languages, like C, C++ or Java, PHP is relatively easy.
Reply:yup why not, depends on you. You may be a PHP programmer in an earlier time too.
Reply:thats really hard, but if u believe in urself and u think u can do it, go AHEAD ;)
Can you become a PHP programmer in 6 months with intensive study?
I certainly feel you can do it, PHP is the easiest language i have every come accross. If you have never done web programming before it will take a few days to understand the concepts of data submission AJAX and so on. PHP is not about studying, php hardly has a syntax, and google is best and fastest reference book you will find in the world. I know many people who were good php programmers in less than a month.
Reply:Absolutely. I learned mySQL, PHP Sessions, and XML in one school semester. We built an inventory web system with all three technologies. We also built a hangman game using AJAX.
It may hard to learn on your own. We had a teacher. But, we had to read our textbooks to write the systems. They just gave us hints on the types of constructs to use. You could easily find out how to implement AJAX online.
Reply:With the correct outline of learning, yes, this would be easy. If this is your FIRST programming language, I don't think so. Just remember--PHP/SQL, OOP, and get a ref. manual. You should be just fine.
Reply:2 years!!! There's books that teach you in 21 days (not consecutive). Compared to other programming languages, like C, C++ or Java, PHP is relatively easy.
Reply:yup why not, depends on you. You may be a PHP programmer in an earlier time too.
Reply:thats really hard, but if u believe in urself and u think u can do it, go AHEAD ;)
How can i scrape a data from websites using screen scraping in php and how can i stores it in MYSQL?
i need to fetch the data from the given websites using only screen scraping and regular expressions in php and mysql.
How can i scrape a data from websites using screen scraping in php and how can i stores it in MYSQL?
For scraping, you can either use regular expressions or, if it's valid XML, you can use XQuery or other DOM parsing utilities. If you're just getting started, try regular expressions:
preg_match_all("/There are (.*) people logged in/", $thePage, $matches);
If $thePage contained "There are 21 people logged in", the function call would return 21.
As for storing the information in MySQL... well.. you should be able to Google for a tutorial on PHP/MySQL.
How can i scrape a data from websites using screen scraping in php and how can i stores it in MYSQL?
For scraping, you can either use regular expressions or, if it's valid XML, you can use XQuery or other DOM parsing utilities. If you're just getting started, try regular expressions:
preg_match_all("/There are (.*) people logged in/", $thePage, $matches);
If $thePage contained "There are 21 people logged in", the function call would return 21.
As for storing the information in MySQL... well.. you should be able to Google for a tutorial on PHP/MySQL.
How can i write code for my web page(written by PHP) refresh automatic after 1 minute?
I want to write code for my web page(written by PHP language) after 1 minute will refresh automatic. Can you help me? Thank you
How can i write code for my web page(written by PHP) refresh automatic after 1 minute?
php only runs on the server, so you must put in a meta refresh tag in the header. Here is an example:
%26lt;meta http-equiv="refresh" content="60; url=index.html"%26gt;
If for some odd reason you need to write the html from a php script:
%26lt;?php
echo "%26lt;meta http-equiv='refresh' content='60; url=index.html'%26gt;";
?%26gt;
Reply:if you meant to reload on the browser...
this script(javascript) should do it...
%26lt;script language="javascript"%26gt;
window.onload=function(){
setTimeout("window.location.reload(true)...
}
%26lt;/script%26gt;
How can i write code for my web page(written by PHP) refresh automatic after 1 minute?
php only runs on the server, so you must put in a meta refresh tag in the header. Here is an example:
%26lt;meta http-equiv="refresh" content="60; url=index.html"%26gt;
If for some odd reason you need to write the html from a php script:
%26lt;?php
echo "%26lt;meta http-equiv='refresh' content='60; url=index.html'%26gt;";
?%26gt;
Reply:if you meant to reload on the browser...
this script(javascript) should do it...
%26lt;script language="javascript"%26gt;
window.onload=function(){
setTimeout("window.location.reload(true)...
}
%26lt;/script%26gt;
Subscribe to:
Posts (Atom)