Jump to content

OLM3CA

Members
  • Posts

    52
  • Joined

  • Last visited

    Never

Everything posted by OLM3CA

  1. I have seen the DVD of Medal of honor 3 in sale ? Is this a fake ? and also COD 3
  2. ok I take your advises and will apply them.thanks
  3. Thank you very much I am so ashamed that I have done a vaiable name mistake I am sorry thank you for your help but I have learned not to use mysql_result in line code thank you.
  4. Thank you for your reply but the same problem still continious...
  5. Thank you I have done that query but I got error,Something wrong with the query but what ? [code] Warning: mysql_result(): supplied argument is not a valid MySQL result resource in ... [/code] [code]<?php                               // This query works fine I think. $query="SELECT * FROM links WHERE ((keywords LIKE '%".$sword."%')         OR (url LIKE '%".$sword."%') OR (aciklama LIKE '%".$sword."%') OR (baslik LIKE '%".$sword."%'))       AND (status ='1') LIMIT $from, $max_results";                 $result=mysql_query($query);                 // The problem is in this query I guess                 $total_results = mysql_result(mysql_query("SELECT COUNT(*) as Num FROM links       WHERE ((keywords LIKE '%".$sword."%')       OR (url LIKE '%".$sword."%') OR (aciklama LIKE '%".$sword."%')       OR (baslik LIKE '%".$sword."%'))     AND (status ='1')"),0); ?>[/code]
  6. I want to search a word more than one column in table but result doesnt change while I add the other columns.Is there something wrong with the usage of the below code ? [code]<?php                 $query="SELECT * FROM link WHERE words LIKE '%".$sword."%' OR url LIKE '%".$sword."%' AND status ='1' LIMIT $from, $max_results"; ?>[/code]
  7. Thank you very much Its ok now.
  8. I think you dont exactly understand my question.My problem is not with the control of form values.My problem is when the form is correctly filled and submitted.Its ok but after you REFRESH the page ıt submits those values again and again with refreshing the page
  9. I am including this page in index.php and form action is : [code]action="index.php?page=newpost"[/code] How can I do ? and can you tell me how can header back to page header("Location: contact.php"); ???
  10. hello. I have a form including name,surname,age etc... If the user miss one of them,the form alerts the user that he/she missed a part but when they fill all of them and submits the form,The form submitted.but the problem is when you refresh page everytime the page submitted with the same datas. I use [code]$_POST['name'] = ""; $_POST['surname'] =""; $_POST['age'] = "";[/code] after if the form values entered. But nothing changes.if you refresh the page ,the form submitted everytime it refreshed.
  11. How can I thank you ? Thank you very much? thank you thank  redarrow :) and thank you all for your help :)
  12. search.php All codes [code]<?php //mysql db connections $kelime= $_GET['kelime']; if(!isset($_GET['page'])){     $page = 1; } else {     $page = $_GET['page']; } $max_results = 2; $from = (($page * $max_results) - $max_results); $query="SELECT * FROM linkler WHERE kelimeler LIKE '%".$kelime."%' LIMIT $from, $max_results"; $result=mysql_query($query); ?> <form method="get" action="<?php echo $_SERVER['PHP_SELF']; ?>"> <table border="0" cellspacing="0" cellpadding="0"> <tr valign="middle"> <td align="left"> SEARCH <br> <input name="kelime" type="text" class="input">&nbsp;</td> <td align="center" valign="bottom"><input type="submit" name="Submit"></td> </tr> </table> </form> <?php while($record=mysql_fetch_assoc($result)){ echo "<br>"; echo $record['name']; echo "<br>"; echo $record['url']; echo "<br>"; echo $record['kelimeler']; $total_results = mysql_result(mysql_query("SELECT COUNT(*) as Num FROM linkler"),0); $total_pages = ceil($total_results / $max_results); if($page > 1){     $prev = ($page - 1);     echo "<a href=\"".$_SERVER['PHP_SELF']."?page=$prev&keyword=$kelime\"></a>"; } for($i = 1; $i <= $total_pages; $i++){     if(($page) == $i){         echo "$i ";         } else {             echo "<a href=\"".$_SERVER['PHP_SELF']."?page=$i&keyword=$kelime\">$i</a> ";     } } if($page < $total_pages){     $next = ($page + 1);     echo "<a href=\"".$_SERVER['PHP_SELF']."?page=$next&keyword=$kelime\"></a>"; } } ?>[/code]
  13. [code]$keyword= $_GET['keyword'];    echo "<a href=\"".$_SERVER['PHP_SELF']."?page=$prev&keyword=$keyword\"></a>"; echo "<a href=\"".$_SERVER['PHP_SELF']."?page=$i&keyword=$keyword\">$i</a> "; echo "<a href=\"".$_SERVER['PHP_SELF']."?page=$next&keyword=$keyword\"></a>";[/code] and form method changed to GET
  14. Please listen I have no problem with listing datas or problem in sql my problem is : When I search for a word for example "myword" there are 10 results shown in everypage there is 2 result THAT makes 5 pages. 1 2 3 4 5 When I click on 2nd its ok but when I want to click or mouse on the 3rd one I see that  [color=green]" page=3&keyword= "[/color]      empty? so When I click it searches to keyword = no keyword    Do you understan me ?
  15. I have a column called "name" $query="SELECT * FROM yyyy WHERE xxxx LIKE '%".$keyword."%' LIMIT $from, $max_results"; yyyy is the table in database xxxx is the column that I search keyword I have a column in my database called "keywords" redarrow I will look at the codes once. sasa I will try Get method
  16. They are correct,the system is working but when ı click on the page links 1 2 3 4 5 etc... the form return back.I cannot see the other page results I see the links but I cannot see the result. I think there is something wrong with the if(!$_POST['keyword']) { }  usage.Because When I click on the next link keyword automaticly dissapears and the query sets back to "no keyword entered". Do you understand me ? My english is not good enough
  17. I just change the values to mines in example keywords column for programming_lanuage and the name variable that I set it in my search form.I changed nothing just I add a form is there something wrong with the form ? I have a name column in my database too.
  18. Thank you very much for your replies I add a form for searching keyword but when I search a word page numbers appear but when I click on them returns back . [color=green]All my codes in :[/color] [u][b]search.php[/b][/u] [code]<?php // mysq connection // database connection $keyword= $_POST['keyword']; if(!isset($_GET['page'])){     $page = 1; } else {     $page = $_GET['page']; } $max_results = 1; $from = (($page * $max_results) - $max_results); $query="SELECT * FROM tablox WHERE keywords LIKE '%".$keyword."%' LIMIT $from, $max_results"; $result=mysql_query($query); if(!$_POST['kelime']) { ?> <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>"> <table border="0" cellspacing="0" cellpadding="0"> <tr valign="middle"> <td align="left"> SEARCH <br> <input name="keyword" type="text" class="input">&nbsp;</td> <td align="center" valign="bottom"><input type="submit" name="Submit" value="search"></td> </tr> </table> </form> <?php } else { while($record=mysql_fetch_assoc($result)){ echo $record['name']; $total_results = mysql_result(mysql_query("SELECT COUNT(*) as Num FROM tablox"),0); $total_pages = ceil($total_results / $max_results); if($page > 1){     $prev = ($page - 1);     echo "<a href=\"".$_SERVER['PHP_SELF']."?page=$prev\"></a>"; } for($i = 1; $i <= $total_pages; $i++){     if(($page) == $i){         echo "$i ";         } else {             echo "<a href=\"".$_SERVER['PHP_SELF']."?page=$i\">$i</a> ";     } } if($page < $total_pages){     $next = ($page + 1);     echo "<a href=\"".$_SERVER['PHP_SELF']."?page=$next\"></a>"; } } } ?>[/code]
  19. Thank you verymuch redarrow but the problem is when I cannot get the searchterm  in other pages. Your paging seems a little comlex for me.If you can convert it to my code I am so glad Blieve that I am dealing with this problem for too long.
  20. ok but what would I write to here : [code]echo "<a href='index.php?page=search&m=$i'>$a</a>";[/code] becouse its seems like index.php?kelime=...
  21. Hello; I have a search form in my index.php, When the form submitted,I include search.php.The search results are shown ten by ten with paging  like 1 2 3 4 ... but while paging results when I click on the other pages The page shows nothing returns to the page that no search keyword is entered.I think the problem is in other pages POST keyword is not taken by page ? [u]search.php[/u] [code]$m = ($_REQUEST['m']);   if ( ! $m) {  $m = "0";  } $result = mysql_query("SELECT * FROM tablex WHERE area1 LIKE '%".$_POST['keyword']."%' AND status='1' order by linkid DESC LIMIT $m,10"); $queri = mysql_query("SELECT * FROM tablex WHERE area1 LIKE '%".$_POST['keyword']."%' AND status='1'"); $totalrow=mysql_num_rows($queri); if($_POST['keyword']) {   while($r=mysql_fetch_array($result)) { $i=0; while ( $i < $totalrow ) {  $a = $a + 1; echo "<a href='index.php?page=search&m=$i'>$a</a>"; $i = $i + 10;  }                               echo $r['name'];                               echo $r['web'];                               echo $r['number']; }[/code]
  22. ı am sorry for this spam but i really need help please
  23. Thanx for your reply but i have no error with page it works correct but i only see page 1 not the others ...
  24. Hi I am having problems with the paging search results.Please help me I am trying to solve this for 3 hours.I think I have problem with the query of paging.My codes are below : [code]$m = ($_REQUEST['m']);   if ( ! $m) {  $m = "0";  } $querym = "SELECT * FROM topic WHERE status=1 limit  $m,10"; $resultm = mysql_query($querym); $rowm= mysql_num_rows($resultm);   while($row = mysql_fetch_array($resultm)) {   if(preg_match("/$word/i", $row['words']))   {           echo $row['name'];           echo $row['msg'];       $arama_sonuc++;  }  $toplam_sonuc++; } echo "Pages:"; $i=0; while ( $i < $rowm) {  $a = $a + 1; echo "<a href='ara3.php?m=$i'>$a</a>"; $i = $i + 2; }[/code]
  25. hi I dont really understand,I couldnt do that.Can you please explain it more. Is this correct with syntax ? [code]$query="SELECT * FROM links WHERE catid=$m and status=1 order by $b $c LIMIT $a"; $result= mysql_db_query("yesterday",$query);[/code] I mean can I use[color=red] order by $x  $y [/color] like this ??? first one is date id etc... second one is asc,desc
×
×
  • 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.