Hi all,
I'm sure this is very easy but I'm having another brain freeze!
At the end of the code I have echoed 3 bits of info to screen $ip, $_POST['ssid'] and $ssid_id".
I would like to put $_POST['ssid'] into a variable, is this possible?
Jamie
Code: <?php
//run site query
require("confwifi.php") ;
{
$ext_site = $_POST['site'];
$extract = mysql_query ("SELECT * FROM site WHERE site='$ext_site'");
$numrows = mysql_num_rows ($extract);
while ($row = mysql_fetch_assoc($extract))
{
$id = $row['id'];
$site = $row['site'];
$ip = $row['ip'];
}
}
?>
<?php
//run site query
require("confwifi.php") ;
{
$ext_ssid = $_POST['ssid_name'];
$extract = mysql_query ("SELECT * FROM ssid WHERE ssid_name='$ext_ssid'");
$numrows = mysql_num_rows ($extract);
while ($row = mysql_fetch_assoc($extract))
{
$ssid_id = $row['ssid_id'];
$ssid_name = $row['ssid_name'];
}
}
?>
<form name="form1" method="POST" action="wifichange.php"><div>
<select name="site">
<option value="0" selected>(please select:)</option>
<option name="site">Llandaf</option>
<option name="site">Cyncoed</option>
<option name="site">Howard Gardens</option>
<option name="site">Colchester Avenue</option>
</select>
<select name="ssid_name">
<option value="0" selected>(please select:)</option>
<option name="ssid_name">Guest</option>
<option name="ssid_name">Conferences</option>
</select>
</form>
<p><input type="text" name="ssid"></div></P>
<div><input type="submit" value="submit"></div>
</form>
<?php echo "$ip"; ?><p></p>
<?php echo $_POST['ssid'];; ?><p></p>
<?php echo "$ssid_id"; ?><p></p>
<?php
List/Menu Box
On an edit page when you want something to select what a user has previously selected from the database, how would you do this for a List/Menu box? The only way I know how is Code: <?php echo
Calling variables
I want to call this to my website but it doesn't display what I want it to,Code: <h5>Edit Subject: <?php echo $sel_subject['menu_name']; ?></h5>If I change
php sessions,logouts & the bloomin back button!
Hi All,I've got a cms that members can log into. When they logout, the session is destroyed, however, if you click the back button, you can get back into the CMS.How can I get around this?My logout
HELP with mysql_real_escape_string
I'm looking to remove apostrophes completely when someone enters lyrics but don't have a clue how to do it.I've attached the 'submit lyric' page and the page where I approve submitted lyrics.(they're
Upload file!
Ok i have a form.. Code: <form name="form1" method="post" action=""> <p>Name: <input name="Name" type="text"
Creating Images from images in PHP
Okay well I am trying to make a 'dynamic' calender image with PHP.I have images like this:and:Obv I have an image for each day of the month (1 - 31) and I have images for each month.if i created a
a very simple php header question (sorry!)
Firstly...I do apologise if this annoys anyone....a header errorI'm do not know php & have tried removing all "white space" but I cant seem to stop the error displaying.Its a very
Procedural to OOP
ohn Kleijn said that to avoid writing "crappy code", we should learn OOP and common OO principles. I've started reading OOP tutorials including the design patterns. And John is right, this
Need help: how to catch acess of undefined class properties
Hello. I am learning OO with PHP and have hit a problem.Some code runs as perfectly valid code, where i would like PHP to issue a warning / error.I guess this is because of the loose typing of PHP,
IP Logger for Voting Script
Can anybody help me place an IP logger into my voting script?I know that maybe it is not as secure, but I would prefer them to be logged into a text file for simplicity's sake.THANKS!The php script is