Merhaba, Arkadaşlar kolay gelsin bir hosting satış scriptinde ufak bir sorunum var; siparis sayfasında yani siparis.php sayfasına giriyorum şöyle bir form var içerisinde Alan adınız: Paket: (burada 2 adet web hosting paketi var ekopaket ve superpaket adinda seçilmesi gereken bilgiler mysql den alınıyor.) Açıklama: Ben adres çubuğunahttp://localhost/siparis.php?Paket=ekopaket yazdığım zaman Paket şeçeneğinin seçilmiş olmasını istiyorum yani ekopaketin seçilmiş olmasını istiyorum. veyahttp://localhost/siapris.php?Paket=superpaket yazdığımda super paketin seçilmiş olmasını istiyorum bunun için siparis.php sayfasında nasıl bir değişikliğe ihtiyaç vardır. siparis.php; <?include("header.php");?> < html> < head> < meta http-equiv="Content-Type" content="text/html; charset=windows-1254"> < !-- Bu sistem Teknoder.Com tarafından geliştirilmektedir. --> < /head> < style type="text/css"> body { margin:0; } < /style> < body> < center> < table border="0" cellpadding="0" cellspacing="0" width="861" height="812"> <!-- MSTableType="layout" --> <tr> <td valign="top" colspan="4" background="http://localhost/images/ust_back.PNG"> <!-- MSCellType="ContentHead" --> </td> <td height="19"></td> </tr> <tr> <td colspan="3"> <!-- MSCellType="ContentHead" --> <img border="0" src="http://localhost/images/logotakip.png"></td> <td valign="top"> <!-- MSCellType="ContentHead" --> <p align="right"> < a href="index.php"> < img title="Ana Sayfa" border="0" src="http://localhost/images/ust_anasayfa.png" width="48" height="48"></a> < a href="destek.php"> < img title="Destek Sistemi" border="0" src="http://localhost/images/ust_destek.png" width="48" height="48"></a> < a href="hosting.php"> < img title="Hostinglerim" border="0" src="http://localhost/images/ust_hostinglerim.png" width="48" height="48"></a> < a href="uye-duzenle.php"> < img title="Hesap Ayarları" border="0" src="http://localhost/images/ust_bilgiler.png" width="48" height="48"></a> < a href="login.php?logout=true"> < img title="Çıkış Yap" border="0" src="http://localhost/images/logout.png" width="48" height="48"></a> </td> <td height="59"></td> </tr> <tr> <td valign="top" colspan="4"> <!-- MSCellType="NavBody" --> <table border="1" width="100%" id="table7" style="border-width: 0px" cellspacing="0" cellpadding="0"> <tr> <td style="border-style: none; border-width: medium" height="121"> <p align="center"> <img border="0" src="http://localhost/images/4content.PNG" width="858" height="112"></td> </tr> <tr> <td style="border-style: none; border-width: medium"> <p> <img border="0" src="http://localhost/images/center_line.PNG" width="854" height="13"></td> </tr> </table> </td> <td height="140"></td> </tr> <tr> <td valign="top"> <!-- MSCellType="NavBody" --> <p align="center"> < img border="0" src="http://localhost/images/musteri_paneli.PNG" width="226" height="38"> <table border="1" width="100%" id="table53" style="border-width: 0px"> <tr> <td style="border-style: none; border-width: medium"> </td> <td style="border-style: none; border-width: medium"> <table border="1" width="100%" id="table54" style="border-width: 0px"> <tr> <td style="border-style: none; border-width: medium" width="15%" colspan="2" height="25"> <p align="center"> <font color="#FF8909" face="Verdana" size="2"> <img border="0" src="http://localhost/images/ok2.gif" width="18" height="18"></font></td> <td style="border-style: none; border-width: medium" height="25" width="80%"> <b><font face="Verdana" color="#FF8909" size="2">Ana Menü</font></b></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="95%" align="right" colspan="3"> <p align="center"> <font color="#FF8909" face="Verdana" size="2"> <img border="0" src="http://localhost/images/subkamp_ayrac_yan.PNG" width="189" height="3"></font></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="4%" align="right"> </td> <td style="border-style: none; border-width: medium" width="11%" align="right"> <font color="#FF8909" face="Verdana" size="2"> <img border="0" src="http://localhost/images/ok1.gif" width="9" height="9"></font></td> <td style="border-style: none; border-width: medium" width="80%"> <font face="Verdana" color="#FF8909" size="2"> <a data-test="test" rel="nofollow" style="word-wrap: break-word; text-decoration: underline;" target="_blank" onclick="return dhExternalLinkRedirect(this)" href="/ExternalLinkRedirect?module=pgdcode&messageId=53253838&url=index.php" style="text-decoration: none" data-href="index.php" style="text-decoration: none"><font color="#FF8909">Ana Sayfa</font></a></font></td> </tr> <tr> <td style="border-style: none; border-width: medium" align="right" colspan="3"> <p align="center"> <font color="#FF8909" face="Verdana" size="2"> <img border="0" src="http://localhost/images/subkamp_ayrac_yan.PNG" width="189" height="3"></font></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="4%" align="right"> </td> <td style="border-style: none; border-width: medium" width="11%" align="right"> <font color="#FF8909" face="Verdana" size="2"> <img border="0" src="http://localhost/images/ok1.gif" width="9" height="9"></font></td> <td style="border-style: none; border-width: medium" width="80%"> <font face="Verdana" color="#FF8909" size="2"> <a data-test="test" rel="nofollow" style="word-wrap: break-word; text-decoration: underline;" target="_blank" onclick="return dhExternalLinkRedirect(this)" href="/ExternalLinkRedirect?module=pgdcode&messageId=53253838&url=hosting.php" style="text-decoration: none" data-href="hosting.php" style="text-decoration: none"><font color="#FF8909">Hostinglerim</font></a></font></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="95%" align="right" colspan="3"> <p align="center"> <font color="#FF8909" face="Verdana" size="2"> <img border="0" src="http://localhost/images/subkamp_ayrac_yan.PNG" width="189" height="3"></font></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="4%" align="right"> </td> <td style="border-style: none; border-width: medium" width="11%" align="right"> <font color="#FF8909" face="Verdana" size="2"> <img border="0" src="http://localhost/images/ok1.gif" width="9" height="9"></font></td> <td style="border-style: none; border-width: medium" width="80%"> <font face="Verdana" color="#FF8909" size="2"> <a data-test="test" rel="nofollow" style="word-wrap: break-word; text-decoration: underline;" target="_blank" onclick="return dhExternalLinkRedirect(this)" href="/ExternalLinkRedirect?module=pgdcode&messageId=53253838&url=destek.php" style="text-decoration: none" data-href="destek.php" style="text-decoration: none"><font color="#FF8909">Destek Talebi</font></a></font></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="95%" align="right" colspan="3"> <p align="center"> <font face="Verdana" size="2"> <img border="0" src="http://localhost/images/subkamp_ayrac_yan.PNG" width="189" height="3"></font></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="4%" align="right"> </td> <td style="border-style: none; border-width: medium" width="11%" align="right"> </td> <td style="border-style: none; border-width: medium" width="80%"> </td> </tr> </table> <table border="1" width="100%" id="table55" style="border-width: 0px"> <tr> <td style="border-style: none; border-width: medium" width="15%" colspan="2" height="25"> <p align="center"> <font color="#0093E0" face="Verdana" size="2"> <img border="0" src="http://localhost/images/ok2.gif" width="18" height="18"></font></td> <td style="border-style: none; border-width: medium" height="25" width="80%"> <b><font face="Verdana" color="#0093E0" size="2">Sipariş & Ödeme</font></b></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="95%" align="right" colspan="3"> <p align="center"> <font face="Verdana" size="2"> <img border="0" src="http://localhost/images/subkamp_ayrac_yan.PNG" width="189" height="3"></font></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="4%" align="right"> </td> <td style="border-style: none; border-width: medium" width="10%" align="right"> <font color="#0093E0" face="Verdana" size="2"> <img border="0" src="http://localhost/images/ok1.gif" width="9" height="9"></font></td> <td style="border-style: none; border-width: medium" width="80%"> <font face="Verdana" color="#0093E0" size="2"> <a data-test="test" rel="nofollow" style="word-wrap: break-word; text-decoration: underline;" target="_blank" onclick="return dhExternalLinkRedirect(this)" href="/ExternalLinkRedirect?module=pgdcode&messageId=53253838&url=siparis-add.php" data-href="siparis-add.php"><font color="#0093E0">Yeni Sipariş</font></a></font></td> </tr> <tr> <td style="border-style: none; border-width: medium" align="right" colspan="3"> <p align="center"> <font color="#0093E0" face="Verdana" size="2"> <img border="0" src="http://localhost/images/subkamp_ayrac_yan.PNG" width="189" height="3"></font></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="4%" align="right"> </td> <td style="border-style: none; border-width: medium" width="10%" align="right"> <font color="#0093E0" face="Verdana" size="2"> <img border="0" src="http://localhost/images/ok1.gif" width="9" height="9"></font></td> <td style="border-style: none; border-width: medium" width="80%"> <font face="Verdana" color="#0093E0" size="2"> <a data-test="test" rel="nofollow" style="word-wrap: break-word; text-decoration: underline;" target="_blank" onclick="return dhExternalLinkRedirect(this)" href="/ExternalLinkRedirect?module=pgdcode&messageId=53253838&url=bildirim-add.php" style="text-decoration: none" data-href="bildirim-add.php" style="text-decoration: none"><font color="#0093E0">Ödeme Bildirimi</font></a></font></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="95%" align="right" colspan="3"> <p align="center"> <font color="#0093E0" face="Verdana" size="2"> <img border="0" src="http://forum.ceviz.net/images/subkamp_ayrac_yan.PNG" width="189" height="3"></font></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="4%" align="right"> </td> <td style="border-style: none; border-width: medium" width="10%" align="right"> <font color="#0093E0" face="Verdana" size="2"> <img border="0" src="http://forum.ceviz.net/images/ok1.gif" width="9" height="9"></font></td> <td style="border-style: none; border-width: medium" width="80%"> <font face="Verdana" color="#0093E0" size="2"> <a data-test="test" rel="nofollow" style="word-wrap: break-word; text-decoration: underline;" target="_blank" onclick="return dhExternalLinkRedirect(this)" href="/ExternalLinkRedirect?module=pgdcode&messageId=53253838&url=banka.php" style="text-decoration: none" data-href="banka.php" style="text-decoration: none"><font color="#0093E0">Banka Hesapları</font></a></font></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="95%" align="right" colspan="3"> <p align="center"> <font face="Verdana" size="2"> <img border="0" src="http://localhost/images/subkamp_ayrac_yan.PNG" width="189" height="3"></font></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="4%" align="right"> </td> <td style="border-style: none; border-width: medium" width="10%" align="right"> </td> <td style="border-style: none; border-width: medium" width="80%"> </td> </tr> </table> <table border="1" width="100%" id="table56" style="border-width: 0px"> <tr> <td style="border-style: none; border-width: medium" width="15%" colspan="2" height="25"> <p align="center"> <font color="#AD1456" face="Verdana" size="2"> <img border="0" src="http://localhost/images/ok2.gif" width="18" height="18"></font></td> <td style="border-style: none; border-width: medium" height="25" width="80%"> <b><font face="Verdana" size="2" color="#AD1456">Diğer</font></b></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="95%" align="right" colspan="3"> <p align="center"> <font face="Verdana" size="2"> <img border="0" src="http://localhost/images/subkamp_ayrac_yan.PNG" width="189" height="3"></font></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="2%" align="right"> </td> <td style="border-style: none; border-width: medium" width="11%" align="right"> <font color="#AD1456" face="Verdana" size="2"> <img border="0" src="http://localhost/images/ok1.gif" width="9" height="9"></font></td> <td style="border-style: none; border-width: medium" width="80%"> <font face="Verdana" color="#AD1456" size="2"> <a style="text-decoration: none" href="uye-duzenle.php"><font color="#AD1456">Müşteri Bilgilerim</font></a></font></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="95%" align="right" colspan="3"> <p align="center"> <font face="Verdana" size="2"> <img border="0" src="http://localhost/images/subkamp_ayrac_yan.PNG" width="189" height="3"></font></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="2%" align="right"> </td> <td style="border-style: none; border-width: medium" width="11%" align="right"> <font color="#AD1456" face="Verdana" size="2"> <img border="0" src="http://localhost/images/ok1.gif" width="9" height="9"></font></td> <td style="border-style: none; border-width: medium" width="80%"> <font face="Verdana" color="#AD1456" size="2"> <a data-test="test" rel="nofollow" style="word-wrap: break-word; text-decoration: underline;" target="_blank" onclick="return dhExternalLinkRedirect(this)" href="/ExternalLinkRedirect?module=pgdcode&messageId=53253838&url=iletisim.php" style="text-decoration: none" data-href="iletisim.php" style="text-decoration: none"><font color="#AD1456">İletişim</font></a></font></td> </tr> <tr> <td style="border-style: none; border-width: medium" align="right" colspan="3"> <p align="center"> <font color="#AD1456" face="Verdana" size="2"> <img border="0" src="http://localhost/images/subkamp_ayrac_yan.PNG" width="189" height="3"></font></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="2%" align="right"> </td> <td style="border-style: none; border-width: medium" width="11%" align="right"> <font color="#AD1456" face="Verdana" size="2"> <img border="0" src="http://localhost/images/ok1.gif" width="9" height="9"></font></td> <td style="border-style: none; border-width: medium" width="80%"> <font face="Verdana" color="#AD1456" size="2"> <a href="login.php?logout=true" style="text-decoration: none"><font color="#AD1456">Çıkış Yap</font></a></font></td> </tr> <tr> <td style="border-style: none; border-width: medium" width="95%" align="right" colspan="3"> <p align="center"> <font color="#AD1456" face="Verdana" size="2"> <img border="0" src="http://localhost/images/subkamp_ayrac_yan.PNG" width="189" height="3"></font></td> </tr> </table> </td> <td style="border-style: none; border-width: medium"> </td> </tr> </table> </td> <td valign="top" background="http://localhost/images/ayrac_nokta.PNG"> <!-- MSCellType="NavBody" --> </td> <td valign="top" colspan="2"> <!-- MSCellType="ContentBody" --> <table border="1" width="100%" id="table31" style="border-width: 0px"> <tr> <td style="border-style: none; border-width: medium" colspan="2"> <font face="Verdana" style="font-size: 13pt" color="#AD1456">Sipariş Ver<br> </font><font face="Verdana" style="font-size: 9pt" color="#AD1456"> </font></td> <td style="border-style: none; border-width: medium" width="10"> </td> </tr> <tr> <td style="border-style: none; border-width: medium" align="center"> </td> <td style="border-style: none; border-width: medium" align="center"> < div class="wrap"> < ? if($_POST[gonder]){ if (!$_POST[webpage]) { ?> < script>alert("Lütfen site ismini yazınız !"); window.location = "siparis-add.php" < /script> < ? }else{ mysql_query("Insert Into siparis (status,package,webpage,customer,paid,info,banka) values ('$status','$package','$webpage','$kulbil[id]','$paid','$info','$bank')"); $alindi=1; //echo "<meta http-equiv=refresh content=0;URL=hosting.php>"; } ?> < ? if ($alindi) { echo "<center><b><br>Siparişiniz alınmıştır.<br><br>Lütfen ödeme bildirimi yapmayı unutmayın.<br><br>Bizi seçtiğiniz için teşekkür ederiz.<br>"; exit; } ?> < ? } else{ ?> < form method="post" action="siparis-add.php"><INPUT type=hidden value=1 name=ix> < table class="editform" width="96%" cellspacing="0" cellpadding="2"> < tr> < th width="97%" scope="row" align="left" bgcolor="#FFFFFF" colspan="2"> <span style="font-weight: 400"> <font face="Arial" style="font-size: 9pt" color="#333333">Lütfen alan adınızı girin ve siparişinizi tamamlayın. Ek olarak belirtmek istediğiniz her şeyi Notunuz bölümüne yazabilirsiniz.</font> < br> <span style="font-size: 7pt"> </span></span></th> < /tr> < tr> < th width="17%" scope="row" align="left" bgcolor="#F7F7F7"> < font face="Verdana" style="font-size: 8pt" color="#666666"><label for="webpage"> & nbsp;Alan Adı:</label></font></th> < td width="80%" bgcolor="#F7F7F7"> < input name="webpage" id="webpage" type="text" value="" size="31" /></td> < /tr> < ?$date = date("20y-m-d");?> < tr> < th width="17%" scope="row" align="left"> < font face="Verdana" color="#666666"><label for="status"> < span style="font-size: 8pt"> Paket:</span></label></font></th> < td width="80%"> < select name='package' id='package' class='postform'> < ? $q2=mysql_query("select * from package order by name"); while ($r2=mysql_fetch_array($q2)) echo "<option value=$r2[id]>$r2[name]</option>"; ?> < /select> < /td> < /tr> < tr> < th scope="row" valign="top" align="left" bgcolor="#F7F7F7"><font face="Verdana" color="#666666"><label for="info"> < span style="font-size: 1pt"> </span><span style="font-size: 8pt"><br> & nbsp;Notunuz:</span></label></font></th> < td bgcolor="#F7F7F7"> < textarea name="info" id="info" rows="5" cols="50" style="width: 356;height:70"></textarea> < /td> < /tr> < tr> < th width="17%" scope="row" valign="top" align="left"> & nbsp;</th> < td width="80%"> < font face="Verdana" style="font-size: 8pt" color="#333333"> Sipariş veren herkes Hizmet Sözleşmesini kabul etmiş sayılır.</font><font color="#333333"> < /font> < br><br> < input type="submit" name="gonder" value="Siparişi Gönder »" style="float: right" /> < /td> < /tr> < /table> < ? if ($customer == 0 ) { ?> < p> < ? } else { ?> < /p> < ? } ?> < /form> < /div> </td> <td style="border-style: none; border-width: medium" width="10" align="center"> </td> </tr> </table> <table border="1" width="100%" id="table45" style="border-width: 0px"> <tr> <td style="border-style: none; border-width: medium" width="8"> </td> <td style="border-style: none; border-width: medium"> <font face="Arial" style="font-size: 10pt; font-weight:700" color="#AD1456"> Önemli Uyarılar<br> </font><font face="Arial" style="font-size: 3pt; font-weight:700" color="#AD1456"> </font><font face="Verdana" style="font-size: 13pt" color="#AD1456"><br> </font><font face="Tahoma" style="font-size: 8pt" color="#333333">•</font><font face="Verdana" color="#333333" size="2"> </font><font face="Arial" color="#333333" size="2"> Ödemenizi yaparken açıklama kısmına alan adınızı mutlaka yazın.</font><font face="Verdana" color="#333333" size="2"><br> </font><font face="Tahoma" style="font-size: 8pt" color="#333333">•</font><font face="Verdana" color="#333333" size="2"> </font><font face="Arial" color="#333333" size="2"> Ödeme işlemini yaptıktan sonra hesabınızın açılması için ödeme bildirimi yapmayı unutmayın.<br> </font><font face="Tahoma" style="font-size: 8pt" color="#333333">•</font><font face="Verdana" color="#333333" size="2"> </font><font face="Arial" color="#333333" size="2"> Sipariş verildikten sonra en geç 3 gün içerisinde ödeme yapılması gereklidir. Aksi takdirde siparişiniz iptal edilir.<br> </font><font face="Tahoma" style="font-size: 8pt" color="#333333">•</font><font face="Verdana" color="#333333" size="2"> </font><font face="Arial" color="#333333" size="2"> Hizmet sözleşmesinin okunmadan kabul edilmesi durumunda doğabilecek tüm sorunlardan müşteri sorumludur.</font></td> <td style="border-style: none; border-width: medium"> </td> </tr> </table> < /td> <td height="495"></td> </tr> <tr> <td valign="top" colspan="4"> <!-- MSCellType="ContentFoot" --> <p align="center"><br> < img border="0" src="http://localhost/images/center_line.PNG" width="857" height="13"><table border="1" width="100%" id="table48" style="border-width: 0px"> <tr> <td style="border-style: none; border-width: medium" width="351"> <table border="1" width="105%" id="table49" style="border-width: 0px"> <tr> <td style="border-style: none; border-width: medium" width="54"> <p align="left"> <img border="0" src="http://localhost/images/logotakip.png"></td> <td style="border-style: none; border-width: medium"> </td> </tr> </table> </td> <td style="border-style: none; border-width: medium"> <table border="1" width="100%" id="table50" style="border-width: 0px"> <tr> <td style="border-style: none; border-width: medium"> <p align="right"> <b><font face="Tahoma" size="2" color="#666666"> <a target="_blank" href="http://www.hostingtakip.com/" style="text-decoration: none"> <font color="#666666">HostingTakip v3.0 - Ücretsiz Müşteri Takip Paneli</font></a></font></b><font face="Tahoma" color="#666666" style="font-size: 10pt"><br> <a target="_blank" href="http://www.teknoder.com/" style="text-decoration: none"> <font color="#666666">Teknoder Bilişim</font></a> tarafından geliştirilmektedir.<br> © 2010 Her Hakkı Saklıdır.</font></td> </tr> </table> </td> </tr> </table> </td> <td height="98"></td> </tr> <tr> <td width="226"></td> <td width="4"></td> <td width="45"></td> <td width="585"></td> <td height="1" width="1"></td> </tr> < /table> < /center> < /body> < /html> < ?include("footer.php");?> < ?}?>
selam, kodunda "echo "<option value=$r2[id]>$r2[name]</option>"; " bulunan yerde aşağıdaki değişikliği yaparsan çalışacaktır, kod daha kısaltılarak da yazılabilirdi ama rahat okunabilir ve anlaşılabilir olması açısından uzun olarak yazdım. echo "<option value=$r2[id]"; if(isset($_GET['Paket']) && $_GET['Paket']=="ekopaket" && $r2['name']=="buraya ekopaketin veritabanindaki adini yazin") { echo " selected=\"selected\""; } elseif (isset($_GET['Paket']) && $_GET['Paket']=="superpaket" && $r2['name']=="buraya superpaketin veritabanindaki adini yazin") { echo " selected=\"selected\""; } echo ">$r2[name]</option>";
merhaba, öncelikle yardımlarınız için teşekkür ederim. dediklerinizi aynen uyguladim fakat siparis.php ye girdiğimde paketler görünmez oldu yani paket seçecek yer boş.