Преглед изворни кода

linking things together

development
mauirixxx пре 8 година
родитељ
комит
6caf2009b1
2 измењених фајлова са 3 додато и 3 уклоњено
  1. +2
    -2
      gw-pull.php
  2. +1
    -1
      gw-toon.php

+ 2
- 2
gw-pull.php Прегледај датотеку

@@ -1,11 +1,11 @@
<?php
$cname = "Chrissi Chan"; //need to make this a POST or GET variable
$cnameid = $_GET['toonid']; //need to make this a POST or GET variable
include_once 'gw-connect.php';
$con = new mysqli(DATABASE_HOST, DATABASE_USER, DATABASE_PASS, DATABASE_NAME);
if ($con->connect_errno > 0){
die ('Unable to connect to database [' . $db->connect_errno . ']');
}
$sql = "SELECT * FROM `history` WHERE `charname` = '$cname' ORDER BY `historydate` ASC";
$sql = "SELECT * FROM `history` WHERE `charname` = '$cnameid' ORDER BY `historydate` ASC";
if (!$result = $con->query($sql)){
die ('There was an error running the query [' . $con->error . ']');
}


+ 1
- 1
gw-toon.php Прегледај датотеку

@@ -9,6 +9,6 @@ if (!$result = $con->query($sql)){
die ('There was an error running the query [' . $con->error . ']');
}
while ($row = $result->fetch_array()){
echo 'Please select a character to continue: ' . $row['charname'] . '<BR />';
echo 'Please select a character to continue: <A HREF="gw-pull.php?toonid=' . $row['playerid'] . '">' . $row['charname'] . '</A><BR />';
}
?>

Loading…
Откажи
Сачувај