Ok, This has been done on DevDreams before. But we have new ppl now so lets do it again.
So you can add 3 lines of code onto the script, or edit a previous line and add 1 new line. I will start it off
[PHP]<?php
require("_config.inc.php");
$query = mysql_query("SELECT * FROM `game`");[/PHP]#
CONFIG.INC.PHP CONNECTS TO THE DB k
Free MySpace Layouts- Coming soon
Photoshop Tutorials- Coming soon
Premium PHP Scripts- Coming soon
Haha i should really do some work so i can remove all the coming soon's
Comments
The Royal Ram
Photoshop Tutorials- Coming soon
Premium PHP Scripts- Coming soon
Haha i should really do some work so i can remove all the coming soon's
The Royal Ram
I have added two lines:
[php]<?php
echo "The communal, DevDreams.com script!";
require("_config.inc.php");
$query = mysql_query("SELECT * FROM `game`");
?>[/php]
echo "The communal, DevDreams.com script!";
require("_config.inc.php");
$query = mysql_query("SELECT * FROM `game`");
echo "i have no idea whatelse to write!";
?>
echo "The communal, DevDreams.com script!";
require("_config.inc.php");
$query = mysql_query("SELECT * FROM `game`");
while($game = mysql_fetch_array($query))
{
}
echo "i have no idea whatelse to write!";
?>[/PHP]
^^ I added the mysql_fetch_array loop
The Royal Ram
[php]<?php
echo "<h1>The communal, DevDreams.com script!</h1>\n
<h2>What it does...</h2>\n
So far.... Not much!";
require("_config.inc.php");
$query = mysql_query("SELECT * FROM `game`");
while($game = mysql_fetch_array($query))
{
}
echo "i have no idea whatelse to write!";
?>[/php]
P.S. Congrats to Python for 4000 posts! :cool:
echo "<h1>The communal, DevDreams.com script!</h1>\n
<h2>What it does...</h2>\n
So far.... Not much!";
require("_config.inc.php");
$query = mysql_query("SELECT * FROM `game`");
while($game = mysql_fetch_array($query))
{
echo $game[gamename]." - ".$game[releasedate]."<br>";
}
echo "i have no idea whatelse to write!";
?>
The Royal Ram
echo "<h1>The communal, DevDreams.com script!</h1>\n
<h2>What it does...</h2>\n
So far.... Not much!";
require("_config.inc.php");
$query = mysql_query("SELECT * FROM `game`");
$row = mysql_Fetch_array($query);
if ( mysql_num_rows($row["gamename"]) ) {
$limit = 10; }
while($game = mysql_fetch_array($query))
{
echo $game[gamename]." - ".$game[releasedate]."<br>";
}
echo "i have no idea whatelse to write!";
?>[/php]
Photoshop Tutorials- Coming soon
Premium PHP Scripts- Coming soon
Haha i should really do some work so i can remove all the coming soon's
[php]
<?php
echo "<h1>The communal, DevDreams.com script!</h1>\n
<h2>What it does...</h2>\n
So far.... Not much!";
require("_config.inc.php");
$query = mysql_query("SELECT * FROM `game`");
$row = mysql_Fetch_array($query);
if ( mysql_num_rows($row["gamename"]) ) {
$limit = 10; }
while($game = mysql_fetch_array($query))
{
echo $game[gamename]." - ".$game[releasedate]."<br>";
}
echo "i have no idea whatelse to write!";
// MySql Table
// news
// id | title | poster | news
$news = mysql_query("SELECT * FROM news ORDER BY id DESC");
while($new1 = mysql_fetch_row($news)) {
?>
<font size=5><?php echo $new1; ?></font> By: <?php echo $new1; ?><br>
<?php echo new1; ?>
<hr>
<br>
<?php
}
?>
[/php]
[php]
<?php
//_config.inc.php//
mysql_connect('localhost', '***', '***');
mysql_select_db('***');
?>
[/php]
[php]
<?php
//index.php//
require("_config.inc.php");
echo "<h1>The communal, DevDreams.com script!</h1>
<h2>What it does...</h2>
So far.... Not much!<br>";
$game_query = mysql_query("SELECT * FROM games ORDER BY id DESC");
if(mysql_num_rows($game_query) > 0) {
while($game = mysql_fetch_row($game_query)) {
echo "<br>";
echo $game . " - Released On " . $game . "<br>";
echo "<a href='" . $game . "'>Click Here To Player</a><hr>";
}
} else {
echo "<br>ERROR: No games inserted!";
}
echo "<br>";
$news_query = mysql_query("SELECT * FROM news ORDER BY id DESC");
if(mysql_num_rows($news_query) > 0) {
while($news = mysql_fetch_row($news_query)) {
echo "<br>";
echo $news . " By: " . $news . "<br>";
echo $news . "<hr>";
}
} else {
echo "<br>ERROR: No news inserted!";
}
?>
[/php]
See it work at
http://presto.0web.uni.cc/tester.php
Also forgot. Mysql crap