Know how technology ineract with man

we depend in technology or technology depend on us?.

Technology grow day after day

as it grows it brings negative or positive impacts?.

learn coding

u wanna be an expert in web designing,monetizing and publishing?.

inventions

you wanna know upcoming tech projects?.

language as robot

learn how programing language can follow your command like a robot do

Search This Blog

Showing posts with label PHP. Show all posts
Showing posts with label PHP. Show all posts

Friday, 29 December 2017

how to mix php in html

When I use iframe in HTML file that linked to test.php .. the result is OK
Test.php :
<?php     
   $host = "localhost";
   $user = "user";
   $pass = "pass";
   $database = "db";
   $koneksi = mysql_connect ($host,$user,$pass);

   mysql_select_db($database,$koneksi) or die ("error");

   $result = mysql_query("SELECT * FROM pengumuman"); 
   $i = 0;

   while($row = mysql_fetch_array($result)) { 
        echo "<li><a href='#'>".$row['judul']."</a></li>";
        $i++;
   } 

   mysql_close($koneksi); 
?>
But I do want to separate this test.php, so I mixed it in my HTML file
<?php 
   $host = "localhost";
   $user = "user";
   $pass = "pass";
   $database = "db";
   $koneksi = mysql_connect ($host,$user,$pass);

   mysql_select_db($database,$koneksi) or die ("error");

   $result = mysql_query("SELECT * FROM pengumuman"); 
   $i = 0;

   while($row = mysql_fetch_array($result)) { 
?> 
   <li><a href='#'><?php $row['judul'] ?> </a></li>

<?php 
        $i++;
   }   
    mysql_close($koneksi); 
?>

Monday, 25 December 2017

TOP PHP PROJECTS FOR BEGINERS


Here is a list of project ideas for PHP beginners. Learning a programming language can sometimes be a little tricky, having a project helps you to structure your learning and get extra motivation.

To-do list.
Make a simple web app where you could add, mark as completed and delete to-do items.
CMS (content management system) for a blog or portfolio (a.k.a very very basic version of WordPress).
Create a simple login/registration system, ability to add and edit content once you are logged in which would be shown on the homepage.
Shopping cart.
Make a list of products with prices and availability and create ability for people to add products to a shopping basket and then send yourself a confirmation email once a person decides to buy things.
RSS news reader.
Build an app which would get you the latest headlines from RSS of your favourite blog.
Basic forum.
Login/Register, make a topic, leave replies, edit content, delete content. Create different permissions for different users – simple users should only be allowed to edit (not delete) the topics and replies that were created by them. Admins should be able to delete and edit anything.
Simple Youtube Player which would allow you to create custom playlists depending on your mood.
Make a list which would automatically play your favorite Youtube songs. Add a search functionality for new songs from Youtube and
Set aside few days to read through the PHP manual and get to know everything there is.
Pick element by element and try to understand what it does and how it’s used. Don’t worry if it doesn’t make much sense straight away. It is hard work, that’s why programmers get paid a lot.
Exercise generator.
Create a database of exercises and make an interface to suggest some exercises depending on the chosen difficulty level.
Simple image gallery.
Create a web app which would allow you to upload images from your computer and would make a nice image gallery with thumbnails of these pictures.
Simple reminder system.
Put a list of things you want to remember and make the system send you an email on a certain time.
App which would visualise how you 24 hours looks like.
Build an app which would allow you to add what you usually do over 24 hours and then it would visualise it with a diagram (or a few).
Simple unit converter.
Kilos to pounds, meters to yards, Celsius to Fahrenheit and then vice versa.
Simple game of Dice Roll.
Build a guessing game where you enter a number from 1 to 6 and then roll the dice to see if you were correct.
Simple game of Rock / Paper / Scissors with user interface and game statistics.
If you’re feeling creative, make it Rock / Paper / Scissors / Lizard / Spock
FamilyBook.
Build a very basic version of Facebook for your family to communicate. Build user profiles, permissions and news feed.
Quiz app.
Make a simple app where you could create quizzes with multiple options to answer and then send a link to another person to solve it and the app would tell how well they’ve performed.
Combine any of these projects. Incorporate Image gallery into FamilyBook or add your games to your portfolio.
Each of these projects might take you a good week or two to complete. Maybe even longer – don’t rush too much. Have fun – programming is all about having fun.

I described these ideas rather vaguely on purpose – I don’t want to bias your mind. These are just starting points. Each of these ideas can be built into something very very simple or very very complex.

If you still don’t know where to start with those ideas, try googling for a tutorial. “How to build simple [project idea] with PHP” should give you a good start.

It’s normal to now know where to start at first. Once you feel comfortable, try to make up challenges, convert them into simple problems and figure out how to solve those problems

Sunday, 24 December 2017

WHAT IS PHP?


PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML.

Nice, but what does that mean? An example:

Example #1 An introductory example

<!DOCTYPE HTML>
<html>
    <head>
        <title>Example</title>
    </head>
    <body>

        <?php
            echo "Hi, I'm a PHP script!";
        ?>

    </body>
</html>
Instead of lots of commands to output HTML (as seen in C or Perl), PHP pages contain HTML with embedded code that does "something" (in this case, output "Hi, I'm a PHP script!"). The PHP code is enclosed in special start and end processing instructions <?php and ?> that allow you to jump into and out of "PHP mode."

What distinguishes PHP from something like client-side JavaScript is that the code is executed on the server, generating HTML which is then sent to the client. The client would receive the results of running that script, but would not know what the underlying code was. You can even configure your web server to process all your HTML files with PHP, and then there's really no way that users can tell what you have up your sleeve.

The best things in using PHP are that it is extremely simple for a newcomer, but offers many advanced features for a professional programmer.