Jump to content

OLM3CA

Members
  • Posts

    52
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Male
  • Location
    Cyprus

OLM3CA's Achievements

Member

Member (2/5)

0

Reputation

  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
×
×
  • 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.