Jump to content

dgnzcn

Members
  • Posts

    92
  • Joined

  • Last visited

Everything posted by dgnzcn

  1. Hi, I am using php dynamic listing from database. it is working but I wanna integrate to a horizontal css menu how can i integrate my codes to any css horizantal dropdown menu. thans. here my dynamic list. <?php function sinirsiz_kategori($parent) { $sql = mysql_query("SELECT * FROM kategoriler ORDER BY id DESC"); while($row = mysql_fetch_array($sql)) { $diziler[$row['id']] = array('baslik' => $row['baslik'],'parent' => $row['parent']); } $has_childs = false; foreach($diziler as $key => $value) { if ($value['parent'] == $parent) { if ($has_childs === false){ $has_childs = true; echo "\t<ul>"; } echo "<li><a href=\"".$value['baslik'].".php\">".$value['baslik']."</a>"; sinirsiz_kategori($key); echo "</li>\n"; } } if ($has_childs === true) echo "</ul>"; } ?> <?=sinirsiz_kategori(0)?>
  2. OK. Here defined : <div id="sticky1"
  3. ok. really thanks for the answers.. I have another problem. <?php $found= include "inc-indirimliurunler.php" ; if($found == ''){ echo ('no product found'); } else { echo include "inc-indirimliurunler.php".$found." ; } ?> where is the wrong code ?
  4. ok. here my codes : <?php do { ?> <table width="170" border="0"> <tr> <td><img src="images/AddToFavoritesIcon.gif" width="8" /></td> <td align="left"><a href="index.php?DM=urundetay&modelid=<?php echo $row_yenilerr['modelid']; ?>" data-tooltip="sticky1"class="kucuk_yazilar"><?php echo $row_yenilerr['marka']; ?> <?php echo $row_yenilerr['urunad']; ?></a> <div id="mystickytooltip" class="stickytooltip"> <div style="padding:5px"> <div id="sticky1" class="atip" style="width:150px"> <img src="urun_resim/<?php echo $row_uruns['image']; ?>" width="150"></div></td> </tr> </table> <?php } while ($row_yenilerr = mysql_fetch_assoc($yenilerr)); ?>
  5. This is my product image tooltip and product link codes from database... <a href="index.php?DM=urundetay&modelid=<?php echo $row_uruns['modelid']; ?>" data-tooltip="sticky1"><?php echo $row_uruns['marka']; ?></a> <div id="mystickytooltip" class="stickytooltip"> <div style="padding:5px"> <div id="sticky1" class="atip" style="width:150px"><img src="urun_resim/<?php echo $row_uruns['image']; ?>" width="150" /></div> Product Links are coming correct from database, but tooltip images not correct, always showing first product image ! how can i fix it ? Edit : I Attached image, you can see the problem.. [attachment deleted by admin]
  6. Hi, This is a image tooltip from database. but I have got the problem, Not Working! How can i fix it. <a href="index.php?MD=urundetay&resimid=<?php echo $row_uruns['resimid']; ?>"><img src="urun_resim/<?php echo $row_image['image']; ?>" width="150" border="0" /></a>
  7. thanks for quick reply... i will try.
  8. Hi; I have this codes simple showing photos and infos from database... I want this : if photo not found from databese then echo : no photo found.. and, if info not found from database then echo : no info found how can i do it..? <?php do { ?> <div style="float:left;"> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td colspan="2" align="center" valign="middle"><img src="images/transparent_line.gif" width="12" height="3" /></td> </tr> <tr> <td width="130" height="135" align="center" valign="middle" bgcolor="#FFFFFF"><a href="urun_res/<?php echo $row_res['file2']; ?>" class="highslide" id="thumb3" onclick="return hs.expand(this)"><img src="urun_res/<?php echo $row_res['file2']; ?>" alt="<?php echo $row_res['info']; ?>" width="100" height="100" title="Büyüt" /></a><a class="highslide" onclick="return hs.expand(this)"></a></td> <td width="15" align="center" valign="middle"> </td> </tr> <tr> <td colspan="2" align="center" valign="top"><img src="images/transparent_line.gif" width="12" height="2" /></td> </tr> <tr> <td colspan="2" align="center" valign="top"><img src="images/transparent_line.gif" width="12" height="10" /></td> </tr> <tr> <td colspan="2" align="center" valign="top"><?php echo $row_res['info']; ?></td> </tr> </table> </div> <?php } while ($row_res = mysql_fetch_assoc($res)); ?>
  9. giving error Parse error: syntax error, unexpected T_STRING in on line 34
  10. soryy my bad english language... i have got the, two database table. first table is : users table : _login_id, username, mail, name, activation, randomcode. second table is : product table : id, product_name, session_user (this is same as user table _login_id, when user is registered recorded a user id also here) i have a product_edit.php page for registered users. in product_edit.php page i wanna this : sessions are, if _login_id different from session_user , then go to index.php this is very simple, but i can not tell you. my bad language english
  11. I want this : in product page, $_SESSION['_login_id'], if different to $_SESSION['session_username'], then go to index.php but session_username is stored in product table, and _login_id is stored in users table. both sessions are number
  12. I want this : in product page, $_SESSION['_login_id'], if different to $_SESSION['session_username'], then go to index.php but session_username is getting from product table, and _login_id is getting from users table. both sessions are number
  13. OK, I TRYED BUT GETTING ERROR. Parse error: syntax error, unexpected ')' in F:\sank\WEB\viman\ilan_edit.php on line 13 elseif(isset($_SESSION['_login_id']) && $_SESSION['_login_id'] != $_GET['id'])) // LINE 13
  14. when user is registered, ID's is recorded in two places like this : in USERS table , and PRODUCT table ILANS.PHP page : each user is getting products listing, but filtering via own ID ILAN_EDIT.php page : this page product edit page. problem was this page, all users can edited, deleted, all the other users product. this is a michael's product edit page : index.php?go=ILAN_EDIT&id=12 but, george user if write down to this same link and paste to adress bar, it can directly edit or delete michaels product. I don't want this.
  15. giving ths message, looks like the two sessions is same Sorry but 1 was equal to 1
  16. my edited like this and there is no luck, it will go to index.php mysql_select_db($database_vekipman, $vekipman); $query_URUNS = "SELECT `session_user` FROM urunler"; $URUNS = mysql_query($query_URUNS, $vekipman) or die(mysql_error()); $row_URUNS = mysql_fetch_array($URUNS); $totalRows_URUNS = mysql_num_rows($URUNS); $_SESSION['session_user']=$row_URUNS['session_user']; if($_SESSION['login_id'] != $_SESSION['session_user']) { $home_url = 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . '/index.php'; header('Location: ' . $home_url); } else { echo 'Sorry but ' . $_SESSION['login_id'] . ' was equal to ' . $_SESSION['session_user']; }
  17. _login_id and session_username is a number... because, when a user is registered, id is also recorded in user table to id, and also , in uruns table to session_username
  18. Ok, I checked your last edited message, and I changed like tihs : mysql_select_db($database_vekipman, $vekipman); $query_URUNS = "SELECT `session_user` FROM urunler"; $URUNS = mysql_query($query_URUNS, $vekipman) or die(mysql_error()); $row_URUNS = mysql_fetch_assoc($URUNS); $totalRows_URUNS = mysql_num_rows($URUNS); $_SESSION['session_user']=$row_URUNS['session_user']; if($_SESSION['_login_id'] != $_SESSION['session_user']) { $home_url = 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . '/index.php'; header('Location: ' . $home_url); } else { echo 'Sorry but the session died.'; exit(); } and no luck still Sorry but the session died mesaages showing.
  19. now give me a this message, I have not luck Sorry but the session died..
  20. Notice: Undefined variable: row_ILAN in F:\sank\WEB\viman\ilan.php on line 4 <? error_reporting(E_ALL); ?> <?php $_SESSION['session_kullanici']=$row_ILAN['session_kullanici']; // LINE 4 if($_SESSION['_login_id'] != $_SESSION['session_kullanici']) { echo "<script>window.location=''</script>"; } else { echo 'Sorry but the session died.'; exit(); } ?>
  21. yes ı Querying like this, and there is no error.. mysql_select_db($database_vman, $vman); $query_ILAN= "SELECT `session_kullanici` FROM ILAN"; $ILAN= mysql_query($query_ILAN, $vman) or die(mysql_error()); $row_ILAN= mysql_fetch_assoc($ILAN); $totalRows_ILAN= mysql_num_rows($ILAN); I wanna save 'session_kullanici' to $_SESSION. But, If '_login_id' and 'session_kullanici' SESSIONS VALUES is different it wil go to index.php. like this = <?php if($_SESSION['_login_id'] != $_SESSION['session_kullanici']echo "<script>window.location='index.php'</script>"; exit();}?>
  22. thanks, no problem.. I wanna add to session of $row_ILAN['session_kullanici'] table.. is this wrong ? = $_SESSION['session_kullanici']=$row_ILAN['session_kullanici'];
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.