Session
ik wil dus een bestel script maken maar mijn sessions werken niet het is voor gamehosting dus misschien kan iemand van jullie me helpen.
Ik zal het stukje van het script geven
Stap 1:
Code (php)
1
2
3
4
5
6
7
2
3
4
5
6
7
<?php session_start();
$_SESSION["game"] = $game;
$_SESSION["type"] = $type;
$_SESSION["slots"] = $slots;
$_SESSION["prijs"] = $prijs;
?>
$_SESSION["game"] = $game;
$_SESSION["type"] = $type;
$_SESSION["slots"] = $slots;
$_SESSION["prijs"] = $prijs;
?>
<td class="description">
<select name="game" onchange="updatePrice()" value="$game">
<option value="0" SELECTED>Select your game
<option value="2|111">Amercica's Army
<option value="2|211">Battlefield 1942
<option value="2|212">Battlefield Vietnam
<option value="2|212">Battlefield 2
<option value="3|311">Call Of Duty
<option value="3|312">Call Of Duty: United Offensive
<option value="1|313">Call Of Duty 2
<option value="3|411">Half Life: Counter-Strike
<option value="1|412">Half Life: Counter-Strike Source
<option value="1|415">Half Life: Day of defeat
<option value="1|416">Half Life: Day of defeat Source
<option value="3|511">Medal of honor: Allied Assault
<option value="3|512">Medal of honor: Spearhead
<option value="1|611">Return to Castle Wolfenstein: Enemy Territory
<option value="3|711">Soldier of Fortune 2
<option value="2|811">Unreal Tournament 2004
</select>
</td>
<td class="description">
<select name="slots" onchange="updatePrice()" value="$slots">
<option value="10">10 Players
<option value="12">12 Players
<option value="14">14 Players
<option value="16">16 Players
<option value="18">18 Players
<option value="20">20 Players
<option value="22">22 Players
<option value="24">24 Players
<option value="26">26 Players
<option value="28">28 Players
<option value="30">30 Players
<option value="32">32 Players
</select>
</td>
<td class="description">
<select name="type" onchange="updatePrice()" value="$type">
<option value="1" SELECTED>Private
<option value="2">Public
</select>
</td>
<td class="description">
<div id="f2" style="display: none">
<select name="tickrate" onchange="updatePrice()">
<option value="0" SELECTED>66
<option value="1">100
</select>
</div>
</td>
</tr>
<tr>
<td class="title">Price per month:</td>
<td class="leftmenu"><input type="text" name="price" value="$prijs" size="9" readonly> Euro</td>
</tr>
<td class="description" colspan="2"><input type="submit" value="Order server..."></td>
?>
Stap 2:
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
<?php
session_start();
$game = $_SESSION["game"];
$slots = $_SESSION["slots"];
$type = $_SESSION["type"];
$prijs = $_SESSION["prijs"];
echo "<form action=\"$PHP_SELF\" method=\"post\">";
echo "<input type=\"hidden\" name=\"game\" value=\".$game.\">";
echo "<input type=\"hidden\" name=\"slots\" value=\".$slots.\">";
echo "<input type=\"hidden\" name=\"type\" value=\".$type.\">";
echo "<input type=\"hidden\" name=\"prijs\" value=\".$prijs.\">";
?>
session_start();
$game = $_SESSION["game"];
$slots = $_SESSION["slots"];
$type = $_SESSION["type"];
$prijs = $_SESSION["prijs"];
echo "<form action=\"$PHP_SELF\" method=\"post\">";
echo "<input type=\"hidden\" name=\"game\" value=\".$game.\">";
echo "<input type=\"hidden\" name=\"slots\" value=\".$slots.\">";
echo "<input type=\"hidden\" name=\"type\" value=\".$type.\">";
echo "<input type=\"hidden\" name=\"prijs\" value=\".$prijs.\">";
?>
Gewijzigd op 01/01/1970 01:00:00 door Emile Verbunt
<select name="type" onchange="updatePrice()" value="$type">
en is dit maar een deel van je script?
Gewijzigd op 01/01/1970 01:00:00 door S -
http://www.pro-flash.com/tuningstylingpoint/session_maker.php
Hier de broncode:
http://www.pro-flash.com/tuningstylingpoint/session_maker.txt
http://www.pro-flash.com/tuningstylingpoint/session_ontvanger.txt
ty maar hoe kan ik dan maken dat de session wordt gekozen uit een list ?
kan iemand plz helpen want ik heb dat echt nodig
Misschien dat ik je dan kan helpen..
met selectbox bedoel je een list ? want ik wil in stappen doen eerst de gameserver opties kiezen en dan persoonlijke gegevens en dan alles laten zien en dan submitten en doorsturen naar mail