Results 1 to 16 of 16
Thread: PHP/MySQL
Hybrid View
-
13th March 2013 19:12 #1Registered User
Join Date: Mar:2013
Location: Sofia
Posts: 33
PHP/MySQL
,
3 PHP MySQL HTML CSS . . (UDK - Unreal Development Kit), . PHP .
:
:PHP Code:<?php require_once("includes/connection.php"); ?>
<?php require_once("includes/header.php"); ?>
<form action="add_new.php" method="POST">
Subject: <input type="text" name="heading" value="" /><br />
Body message:<br />
<textarea id="new_message_form" name="message" rows="20" cols="80" ></textarea><br />
<input type="submit" name="submit" value="Submit!" /><br />
</form>
<?php require_once("includes/footer.php"); ?>
3 :PHP Code:<?php require_once("includes/connection.php"); ?>
<?php
$heading = $_POST['heading'];
$message = $_POST['message'];
$sql = "INSERT INTO news (new_heading, new_message, date)
VALUES ('{$heading}', '{$message}', CURDATE())";
$result = mysql_query($sql, $conn);
if(!$result) {
echo "Failed to add new: " . mysql_error();
} else {
echo "Successfully added new. <br />";
echo "<a href=\"news.php\">See news</a>";
}
?>
"Enter"- .PHP Code:<?php
$sql = "SELECT * FROM news ORDER BY id DESC LIMIT 3";
$result = mysql_query($sql, $conn);
while($row = mysql_fetch_array($result)) {
echo "<h2>Current News</h2>";
echo "<table border=\"2\" width=\" 400 \" height=\" auto \">";
echo "<tr><td><span class=\"mes_head\">{$row['new_heading']}</span></td>
<td><span class=\"mes_head\">{$row['date']}</span></td></tr>"; //Date and Heading
echo "<tr><td colspan=\"2\"><span id=\"mes_body\">{$row['new_message']}</span</td></tr>";
echo "</table>";
}
echo "<a href=\"add_new_form.php\">Add new entry</a>";
?>
. :
, "Enter"-? , Google 3 "", .Thing to create:
*Create source code for the game
*Create a map
*Create weapons
*Create player model
*Create bot models
Developing the game on:
Unreal Development Kit(UDK)
, : , html ? HardwareBG(, , , ). , .
-
14th March 2013 09:04 #2
, - , .
- ""- - <br>, ... .
. . 3 , . ,
.
Fujistu Lifebook E756 | Core i7-6500U / 400MHz-3.1GHz | 8 GB DDR4-2133 | Samsung PM871 / 256 GB SSD | 15" 1920x1080 | Manjaro Linux + kernel 4.19
-
14th March 2013 13:22 #3Registered User
Join Date: Mar:2013
Location: Sofia
Posts: 33
. , . . 2 , Lynda.com. . . . , nl2br($string);. , . .
index.php . , . .. .ALL GREAT THINGS ARE SIMPLE AND MANY CAN BE EXPRESSED IN SINGLE WORDS:
FREEDOM, JUSTICE, HONOR, DUTY, MERCY, HOPE.
Winston Churcill
-
15th March 2013 00:57 #4
- / -/ :
[Enter]-.Code:echo "<tr><td colspan=\"2\"><span id=\"mes_body\"><pre>{$row['new_message']}</pre></span</td></tr>";
PHP- EOL <br>ASRock B550M Pro 4; Ryzen R5 3600; 2x16 GiB G.SKILL Aegis 3200; 1TB Samsung QVO 960 + 3TB Seagate IronWolf; Zalman Z1
-
15th March 2013 01:24 #5
Join Date: Apr:2006
Location:
Posts: 8,666
, .
http://www.php.net/manual/en/faq.gen...q.general.what
What does PHP stand for?
PHP stands for PHP: Hypertext Preprocessor.
-
15th March 2013 02:04 #6
HTML-a nl2br() .
POST - mysql_real_escape_string SQL Injection''? * *
- !
...
-
15th March 2013 08:32 #7Registered User
Join Date: Mar:2013
Location: Sofia
Posts: 33
ALL GREAT THINGS ARE SIMPLE AND MANY CAN BE EXPRESSED IN SINGLE WORDS:
FREEDOM, JUSTICE, HONOR, DUTY, MERCY, HOPE.
Winston Churcill
-
15th March 2013 09:27 #8
Join Date: Apr:2006
Location:
Posts: 8,666
, PDO.
- explode(" ", $string, 10) 10, .
php.net , !
-
15th March 2013 10:58 #9Registered User
Join Date: Jul:2005
Location: Sofiq
Posts: 2,798
:
$length. , substr UTF-8 .function substr_word($txt, $length, $offset = 0) {
return trim(mb_substr($txt, $offset, mb_strpos($txt, ' ', $offset + $length, 'UTF-8'), 'UTF-8'));
}
html , overflow: hidden; word-wrap: break-word; width, height . "", .
Edit: , word-wrap: break-word;




Reply With Quote

Lenovo ThinkPad 15 IdeaPad 15
5th May 2023, 22:16 in