PHP not posting image
This is my in page code
$min = $_POST['MIN'];
$max = $_POST['MAX'];
$option = $_POST['OPTION'];
$game = $_POST['GAMES'];
session_start();
if(isset($_SESSION['user'])){
$user = $_SESSION['user'];
}
if(!isset($_SESSION['logged_in'])){
echo 'NOT AUTHORIZED';
} else { ?>
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link href="/jquery.mobile-1.3.1.css" rel="stylesheet" type="text/css"/>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script
src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js"></script>
<script type="text/javascript" src="/js/iscroll.js"></script>
<script type="text/javascript" src="/js/scroll_test.js"></script>
<style>
html, body { padding: 0; margin: 0; }
html, .ui-mobile, .ui-mobile body {
height: 435px;
}
.ui-mobile, .ui-mobile .ui-page {
min-height: 435px;
}
.ui-content{
padding:10px 15px 0px 15px;
}
.panel-content { padding:15px; }
</style>
</head>
<body>
<div id="" data-role="page" style="width:1024px; height:768px;"
class="ui-responsive-panel.pan" data-theme="a2">
<div data-role="content" id="" data-theme="a3" style="width:
1024px; height: 768px; font-family: Arial; font-size: 72px;
color:#FFF">
<a href="#leftpanel1"><img src="/test_btn.png"/></a><br>
<p id="" class="min"><img src="<?php echo $imgurl; ?>"/></p>
<p id="" class="max"><?php echo $min; ?></p>
<p id="" class="dealer"><?php echo $max; ?></p>
<p id="" class="game"><?php echo $option; ?></p>
Here is my PHP & form code
<?php
session_start();
if(!isset($_SESSION['logged_in'])){
echo 'NOT AUTHORIZED';
} else {
$user_name = "root";
$password = "root"; # Important: Change this for live database.
$database = "castnet";
$server = "localhost";
$db_handle = mysql_connect($server, $user_name, $password);
$db_found = mysql_select_db($database, $db_handle);
if ($db_found) {
$output = array();
$result = mysql_query("SELECT id,name,image FROM games");
while($results = mysql_fetch_assoc($result))
$output[] = $results;
$game = '';
foreach ($output as $k => $v){
$game.= '<option value="'.$v['name'].'">'.$v['id'].'
'.$v['name'].''.$v['image'].'</option>';
}
}
?><?php } ?>
<form action="/Net.php" method="POST" >
<select name="MIN" class="select" data-theme="a" data-icon="false">
<option value="">Select a Min Bet:</option>
<?php echo $min; ?>
</select>
<select name="MAX" class="select" data-theme="a" data-icon="false">
<option value="">Select a Max Bet:</option>
<?php echo $max; ?>
</select>
<select name="OPTION" class="select" data-theme="a" data-icon="false">
<option value="">Select a Dealer:</option>
<?php echo $option; ?>
</select>
<select name="GAME" class="select" data-theme="a" data-icon="false">
<option value="">Select a Game:</option>
<?php echo $game; ?>
</select>
<br><br>
<button type="submit" data-theme="a">Submit</button>
</form>
I know something is wrong because when I had it set for just the id & name
option it posted that just fine. The name filename and url show up in my
select list but nothing posts when i choose the option with the url in it.
No comments:
Post a Comment