Jump to content

semiColon

Members
  • Content Count

    18
  • Joined

  • Last visited

Community Reputation

0 Neutral

About semiColon

  • Rank
    Newbie
  • Birthday 02/23/1981

Contact Methods

  • Website URL
    http://
  • ICQ
    0

Profile Information

  • Gender
    Male
  1. Thanks all my friends..I've done it ..(f)
  2. yeah, it uses a text file to save the data.i'll try another with a database, if there isn't any method to that without it.. thanks,
  3. No.. this guest book have not a database..Is there another way to do that?
  4. hello everybody!i used this guest book: http://www.phpjunkyard.com/php-guestbook-script.phpit's so far so good with me.. but how can i prevent the posts by the guests until i approve them?Thanks,
  5. Is it okay if use this stmt:SELECT * FROM articles WHERE body LIKE '%$keyword%'; is it okay to use that syntax?i know that it's slow and inefficient, but i couldn't understand the: Full-text search until now. I have to understand this method these two days..
  6. Ops! so sorry : (. I'm really nervous this week because of the exam : (Thank you so much.
  7. yeah, that's fine now. Thanks : )but, do you know why i get that error?
  8. Thanks a lot a lot Ingolme..Isn't there another way to submit it without the submit button? I mean: when the user selects the country, it'll be submit..I tried to add the submit button as you mentioned above, but i face an error that is: : (
  9. This is the form: <?php$con = mysql_connect("localhost","root","");if (!$con) { die('Could not connect: ' . mysql_error()); }mysql_select_db("countriesdb", $con);?>choose a country:<form action="getcitiy.php" method="get"> <select name="country"> <option value="">select:</option> <?php $result = mysql_query("SELECT DISTINCT country FROM cities"); while ($row = mysql_fetch_assoc($result)) { echo "<option value=\"{$row['country']}\">{$row['country']}</option>"; } ?></select></form> and this is the "getcity.php": <?php$con = mysql_connect("localhost","root","");if (!$con) { die('Could not connect: ' . mysql_error()); }mysql_select_db("countriesdb", $con);$result = mysql_query("SELECT * FROM cities WHERE country = '" . mysql_real_escape_string($_GET['country']) . "'"); while($row = mysql_fetch_array($result)) { echo $row['name'] . " " . $row['country']; echo "<br />"; }mysql_close($con);?>
  10. Yeah, It's better now.. But I don't know why it doesn't return any thing when i choose the country : (
  11. Thank you so much, I really appreciate that..Ingolme, Thanks a lot..justsomeguy, thanks so much..I'm trying now the simple one which Ingolme describe it, after that I'll go to justsomeguy's suggestion...this is the Form: choose a country:<form action="getcitiy.php" method="get"><select name="country"><option value="select">select:</option><option value="france">France</option><option value="USA">U.S.A</option><option value="Spain">Spain</option></select></form> and this is the "getcity.php": <?php$con = mysql_connect("localhost","root","");if (!$con) { die('Could not connect: ' . mysql_error()); }mysql_select_db("countriesdb", $con);if ( $country=$_POST["france"] )$result = mysql_query(SELECT * FROM cities WHERE country = 'France');elseif $country=$_POST["USA"]$result = mysql_query(SELECT * FROM cities WHERE country = 'USA');elseif $country=$_POST["spain"]$result = mysql_query(SELECT * FROM cities WHERE country = 'Spain');while($row = mysql_fetch_array($result)) { echo $row['name'] . " " . $row['country']; echo "<br />"; }mysql_close($con);?> what do you think?
×
×
  • Create New...