Here you can see live Silverlite WP theme
Price: 20€
Tutorials for PHP, HTML and XML
I this tutorial i will show how to change defult style of <input> field.
The input field will look like this:
![]()
Here is the code for this input field
<input type=”text” name=”search” size=”10″ maxlength=”14″style=”width:106px; height:22px; border-style: hidden;
border-width: 0px;
color: none;
font-family:Comic Sans MS;
padding: 5px 5px 0 5px;
font-size:8pt;
background-color:none;
background-image: url(http://dobrote.si/images/ozadje/search.gif);
background-repeat:no-repeat;”‘>
Hello, is this tutorial i will show how to create XML from MySql table.
First we need connection to DB and table. How to do this you cen read here.
Here is the code for connection. The table name is “users”. The content of table is:
| id | user | pass |
| 1 | admin | admin |
| 2 | john | john |
The code for connection:
First we make connection.
$connection = mysql_connect(”localhost”, “username”, “password”) or die(’Could not connect: ‘ . mysql_error());
This tutorial wil show how to connect to mysql DB and print table.
First we need variable for connection. The variable will be $connection
We need function:
mysql connect(”localhost”,”username”,”"password)
Next step is to store connection to variable, so we can used it later in the script.
$connection = mysql_connect(”localhost”,”username”,”passwor”);
If the connection fails we use die() function.
die(’Could not connect: ‘ . mysql_error());
Now i will show how to connect to table in database. The table will be user. Table look like this:
| id | user | pass |
| 1 | admin | admin |
| 2 | john | john |
Here is the tutorial that will show you how to prevent your visitors to copy text from your page.
It si very simple.
To prevent copy you need to add this line to css file:
.dontCopy{
-moz-user-select:none;
}
Now to prevent copy text just define class “dontCopy” in html.
<div class=”dontCopy”>
This text can’t be copied
</div>
This works on Firefox.
For IE you need to add in <div> onselectstart=”return false”
<div onselectstart=”return false”>
This text can’t be copied
</div>
Hello, this tutorial will show how to read XML files with PHP
First we need XML file. I will create XML file with name test.xml. XML looks like this:
<?xml version=”1.0″ encoding=”ISO-8859-1″?>
<contact>
<email>E-mail</email>
<name>Name</name>
<message>Message</message>
</contact>
Now we need php function to load XML file. This function is simplexml_load_file() .
We need one variable. I will call it $xml .
The next step is to load xml in this variable.