Click here to Skip to main content
15,885,278 members
Home / Discussions / Linux, Apache, MySQL, PHP
   

Linux, Apache, MySQL, PHP

 
QuestionHow to code login page in html css php Pin
Member 150661826-Feb-21 1:01
Member 150661826-Feb-21 1:01 
AnswerRe: How to code login page in html css php Pin
Richard MacCutchan6-Feb-21 1:27
mveRichard MacCutchan6-Feb-21 1:27 
QuestionPosting dropdown value to database Pin
Member 1505550825-Jan-21 2:27
Member 1505550825-Jan-21 2:27 
AnswerRe: Posting dropdown value to database Pin
Richard Deeming25-Jan-21 4:04
mveRichard Deeming25-Jan-21 4:04 
GeneralRe: Posting dropdown value to database Pin
Member 1505550825-Jan-21 6:31
Member 1505550825-Jan-21 6:31 
GeneralRe: Posting dropdown value to database Pin
Richard Deeming25-Jan-21 21:28
mveRichard Deeming25-Jan-21 21:28 
GeneralRe: Posting dropdown value to database Pin
Member 1505550825-Jan-21 21:57
Member 1505550825-Jan-21 21:57 
GeneralRe: Posting dropdown value to database Pin
Richard Deeming25-Jan-21 22:36
mveRichard Deeming25-Jan-21 22:36 
Something like this should work:
PHP
<?php
    @session_start();
    header('Content-Type: text/html; charset=ISO-8859-1');
    include('includes/config.php');
?>
<link rel="stylesheet" type="text/css" href="css/chat.css" />
<div id="sidebar_header">Garderobe</div>
<div id="sidebar_content">
    <form action="nygad.php" method="POST">
        <p style="display: inline;">Skid i havet.</p><br /><br />
        <select name="sko">
        <?php
            if(isset($_SESSION['logget_ind']) && $_SESSION['logget_ind'] == true) {
                $brugernavn = mysql_real_escape_string($_SESSION['brugernavn']);
                $getSko = mysql_query("SELECT `navn` FROM `chat_clothes` WHERE `ejer` = '$brugernavn' AND `type` = 'sko'");
                while ($showSko = mysql_fetch_array($getSko)) {
                    $navn = htmlentities($showSko['navn']);
                    echo "<option value=\"$navn\">$navn</option><br />";
                }
            }
        ?>
        </select>
        <?php
            if (isset($_POST['sko'])) {
                $shoes = mysql_real_escape_string($_POST['sko']);
                $id = mysql_real_escape_string($_SESSION['id']);
                mysql_query("UPDATE chat_brugere SET shoes='$shoes' WHERE id='$id'");
                echo 'sko er opdateret!';
            }
        ?>
        <p style="text-align:center;">
            <input type="submit" name="btn" value="Opdater!" />
        </p>
    </form>
</div> <!-- sidebar_content -->




"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer

GeneralRe: Posting dropdown value to database Pin
Member 1505550825-Jan-21 22:58
Member 1505550825-Jan-21 22:58 
GeneralRe: Posting dropdown value to database Pin
Richard Deeming26-Jan-21 2:10
mveRichard Deeming26-Jan-21 2:10 
GeneralRe: Posting dropdown value to database Pin
Member 1505550826-Jan-21 3:27
Member 1505550826-Jan-21 3:27 
GeneralRe: Posting dropdown value to database Pin
jsc4226-Jan-21 3:40
professionaljsc4226-Jan-21 3:40 
GeneralRe: Posting dropdown value to database Pin
Richard Deeming26-Jan-21 3:44
mveRichard Deeming26-Jan-21 3:44 
QuestionHTML Form...Submit to E-Mail Pin
Member 149874928-Nov-20 20:04
Member 149874928-Nov-20 20:04 
QuestionCan't import pfx. Pin
ArturNoubel3-Nov-20 8:27
ArturNoubel3-Nov-20 8:27 
AnswerRe: Can't import pfx. Pin
Richard MacCutchan2-Nov-20 3:18
mveRichard MacCutchan2-Nov-20 3:18 
GeneralRe: Can't import pfx. Pin
ArturNoubel3-Nov-20 7:54
ArturNoubel3-Nov-20 7:54 
QuestionEquation of the third degree Pin
Member 1496562714-Oct-20 14:50
Member 1496562714-Oct-20 14:50 
AnswerRe: Equation of the third degree Pin
Richard MacCutchan14-Oct-20 22:37
mveRichard MacCutchan14-Oct-20 22:37 
AnswerRe: Equation of the third degree Pin
ZurdoDev15-Oct-20 1:17
professionalZurdoDev15-Oct-20 1:17 
Questionscreen with error in displaying the data, sql code does not work Pin
mynameyugioh21-Aug-20 13:38
mynameyugioh21-Aug-20 13:38 
QuestionAdding uploaded file in email response contact form mail.php Pin
DixieReid21-Jul-20 15:18
DixieReid21-Jul-20 15:18 
AnswerRe: Adding uploaded file in email response contact form mail.php Pin
Richard Deeming21-Jul-20 23:22
mveRichard Deeming21-Jul-20 23:22 
GeneralRe: Adding uploaded file in email response contact form mail.php Pin
DixieReid22-Jul-20 0:09
DixieReid22-Jul-20 0:09 
QuestionHow can I submit with 1 button and 1 form with 2 actions? Pin
amitb221-Jul-20 0:08
amitb221-Jul-20 0:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.