Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About williamh69

  • Rank
  1. williamh69

    update problem

    hi guys i cant edit my data... what is my error <?php // get value of id that sent from address bar $menu_id=$_GET['menu_id']; // Retrieve data from database $sql="SELECT * FROM menus WHERE menu_id='$menu_id'"; $result=mysql_query($sql); $rows=mysql_fetch_array($result) ?> <table width="400" border="0" cellspacing="1" cellpadding="0"> <tr> <form name="form1" method="post" action="update_ac.php"> <td> <table width="100%" border="0" cellspacing="1" cellpadding="0"> <tr> <td> </td> <td colspan="3"><strong>Update data in mysql</strong> </td> </tr> <tr> <td align="center"> </td> <td align="center"> </td> <td align="center"> </td> <td align="center"> </td> </tr> <tr> <td align="center"> </td> <td align="center"><strong>Menu name</strong></td> </tr> <tr> <td> </td> <td align="center"> <input name="menu_name" type="text" id="menu_name" value="<? echo $rows['menu_name']; ?>"> </td> <td> </td> <td align="center"> <input type="submit" name="Submit" value="Submit"> </td> <td> </td> </tr> </table> </td> </form> </tr> </table> <?php // close connection mysql_close(); ?> error said:_ notice: Undefined index: menu_id in C:\wamp\www\sparklenshine2\admin\edit.inc.php on line 4 the tablet is: menu_id | menu_name
  2. williamh69


    i found this class to use it <?php class Cleaner { var $stopwords = array(" find ", " about ", " me ", " ever ", " each ", " update ", " delete ", " add ", " insert ", " where ", " i ", " a ", " my ");//you need to extend this big time. var $symbols = array('/','\\','\'','"',',','.','<','>','?',';',':','[',']','{','}','|','=','+', '-','_',')','(','*','&','^','%','$','#','@','!','~','`'); function parseString($string) { $string = ' '.$string.' '; $string = $this->removeStopwords($string); $string = $this->removeSymbols($string); return $string; } function removeStopwords($string) { for ($i = 0; $i < sizeof($this->stopwords); $i++) { $string = str_replace($this->stopwords[$i],' ',$string); } return trim($string); } function removeSymbols($string) { for ($i = 0; $i < sizeof($this->symbols); $i++) { $string = str_replace($this->symbols[$i],' ',$string); } return trim($string); } }
  3. williamh69


    no,,, look for the stop words in the text, echo them back, (so like this you can delete manually or using any function to erase it) before enter to database.
  4. williamh69


    Some search engines don't record extremely common words in order to save space or to speed up searches. These are known as "stop words."
  5. Hi guys, thank so much for all your help. I have this question: I have a two tables one is a content text, and the other one there are the stop words. I would like to match my content with those stop words and echo them, before submit to db. content stopwords content_id words content any suggestion thank you
  6. williamh69

    Review my website-thank you

    thank you guys
  7. williamh69

    Review my website-thank you

    Hi guys... please review my website. I appreciate your comments. www.sparklenshinecs.com
  8. williamh69

    php and mysql question

    ok thank you very much, i really appreciate your help. thank you thank you
  9. williamh69

    php and mysql question

    thank you, i re-wrote the code....this is what i have now <?php $menu_id = $_GET['cat']; $sql = mysql_query("SELECT * from paginas WHERE menu_id=$menu_id"); if(mysql_num_rows($sql)>0) { while($row = mysql_fetch_array($sql)) { $title = $row['title']; $sub_title = $row['sub_title']; $content = $row['content']; $title_tag= str_replace(' . ',' | ',$row['title_tag']); $keywords= $row['keywords']; $description= $row['description']; echo "<title>$title_tag</title>"; echo"<meta name='keywords' content='$keywords'>"; echo"<meta name='description' content='$description'></br>"; } echo"<h1>$title</h1>"; echo"<h2>$sub_title</h2>"; echo"<p>$content</p>"; } else { echo "No results found!"; } ?> what you think?
  10. williamh69

    php and mysql question

    Hi guys, thank you for all your help i really appreciated. I have my website, www.sparklenshinecs.com, and i am trying to do a SEO on it. However when I run a seo report appears two different lines of code as follow http://www.sparklenshinecs.com/index.php?content=paginas&amp;cat=7 and http://www.sparklenshinecs.com/index.php?content=paginas&cat=7 if I run the first link it gives me the following error on the page: Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/content/10/9601510/html/paginas.inc.php on line 7 Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/content/10/9601510/html/paginas.inc.php on line 38 Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/content/10/9601510/html/paginas.inc.php on line 56 and if I run the second link: it gives me the normal page. Someone can please explain me whats going on, and how I avoid those warnings.

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.