BIT301Semester V10 units60 solved questions693 study cardsFull study modes
The free sample is open to everyone. Sign in for 2 free weeks of every answer, flashcards and progress.
PHP is a popular language for building dynamic web pages. This chapter explains how PHP runs on a server, how to write its basic syntax, and how it handles variables, types and strings.
A server side script runs on the web server, not in the browser. The browser sends a request, the server runs the script, and only the output (usually HTML) goes back to the browser. The user never sees the PHP code.
Working of a PHP request:
index.php.Server side scripting helps to build pages that change with each user, read databases, handle forms, keep login sessions and protect business logic.
| Server side | Client side |
|---|---|
| Runs on the web server | Runs in the browser |
| PHP, ASP.NET, Python, Node.js | JavaScript, HTML, CSS |
| Can access database and files | Cannot directly access the server database |
| Code is hidden from the user | Code is visible to the user |
PHP code is placed inside the tags <?php and ?>. Anything outside these tags is sent to the browser as plain HTML. The file must be saved with the .php extension.
<html>
<body>
<h1>Welcome</h1>
<?php
$name = "Sita";
echo "Hello, " . $name;
?>
<p>Today is <?= date("d M Y") ?></p>
</body>
</html>
<?php ... ?> is the standard tag and always works.<?= expr ?> is a short way to echo a value.echo and print send output to the page. echo is slightly faster and can take many values.?> tag.Web Technology II for TU BIT is covered here in full, from syllabus notes to solved past questions. This subject has 10 chapters mapped to the official syllabus, and 60 past exam questions with written model answers. The opening of every note and answer is free, and the most-searched questions are free in full. A free account gets 2 free weeks of the whole program plus flashcards and progress tracking so weak topics come back before the exam.
This TU BIT Web Technology II guide covers PHP Fundamentals and Syntax, Control Structures and Loops, Functions and Variable Scope, Arrays and Data Structures, String Processing and Regular Expressions, Object Oriented Programming, Form Handling and HTTP Methods, Database Operations, and more, across 10 chapters. It includes model answers to 60 past exam questions, plus flashcards for quick revision.
Web Technology II has 10 chapters mapped to the official syllabus.
Yes. Each of the 60 past questions comes with a written model answer; the most-searched ones are free in full, the rest open with a free account's 2 free weeks or a pass.
Free to start. The opening of every note and answer is free, the most-searched questions are free in full, and a free account gets 2 free weeks of the whole program plus flashcards and progress tracking. After that a program pass keeps everything open.
Based on the official syllabus.
PHP is a popular language for building dynamic web pages. This chapter explains how PHP runs on a server, how to write its basic syntax, and how it handles variables, types and strings.
A server side script runs on the web server, not in the browser. The browser sends a request, the server runs the script, and only the output (usually HTML) goes back to the browser. The user never sees the PHP code.
Working of a PHP request:
index.php.Server side scripting helps to build pages that change with each user, read databases, handle forms, keep login sessions and protect business logic.
| Server side | Client side |
|---|---|
| Runs on the web server | Runs in the browser |
| PHP, ASP.NET, Python, Node.js | JavaScript, HTML, CSS |
| Can access database and files | Cannot directly access the server database |
| Code is hidden from the user | Code is visible to the user |
PHP code is placed inside the tags <?php and ?>. Anything outside these tags is sent to the browser as plain HTML. The file must be saved with the .php extension.
<html>
<body>
<h1>Welcome</h1>
<?php
$name = "Sita";
echo "Hello, " . $name;
?>
<p>Today is <?= date("d M Y") ?></p>
</body>
</html>
<?php ... ?> is the standard tag and always works.<?= expr ?> is a short way to echo a value.echo and print send output to the page. echo is slightly faster and can take many values.?> tag.