Jump to content

hakmir

Members
  • Posts

    35
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

hakmir's Achievements

Member

Member (2/5)

0

Reputation

  1. Hi Guys, I tried to put pagination code into my search results but every time I get an ugly error. Can you guys help me please?I just want to put 5 results per page. Why does it have to be so complicated. I am just asking something very simple (Well, it shows that you don't know anything about php dude! ( I am just talking to myself)) <a href="search.php">Search</a><br> <br> <?php include("connect.php"); $first_name = "%" . $_POST["first_name"] . "%"; $last_name = "%" . $_POST["last_name"] . "%"; $age = "%" . $_POST["age"] . "%"; $query= "SELECT * FROM `contacts` WHERE `first_name` LIKE '$first_name' AND `last_name` LIKE '$last_name' AND `age` LIKE '$age' ORDER BY `contacts`.`first_name` ASC LIMIT 0, 30 "; $result = mysql_query($query); $num = mysql_num_rows ($result); mysql_close(); if ($num > 0 ) { $i=0; while ($i < $num) { $first_name = mysql_result($result,$i,"first_name"); $last_name = mysql_result($result,$i,"last_name"); $age = mysql_result($result,$i,"age"); $id = mysql_result($result,$i,"id"); echo "<b>first name:</b> $first_name<br>"; echo "<b>last name:</b> $last_name<br>"; echo "<b>age:</b> $age<br>"; echo "<a href=\"update.php?id=$id\">Update</a> - <a href=\"delete.php?id=$id\">Delete</a>"; echo "<br><br>"; ++$i; } } else { echo "No Results"; }?>
  2. Thanks for reply. I wish there were something light. Like an firefox addon. I don't know why they still didn't make an addon like this. Is it so complex? Just put a simple editor in it even if you don't make it colorful.
  3. I am using fireftp and doing the editing in notepad2. It's so cool that when I make any change in notepad it updates on your website too. But what I want is that I want ftp and code editor in same browser (splited). Is there such thing? I made an image about what I want. You'll understand better what I mean. I saw firebug. It is nice but it doesn't edit the file as it is . Like php file. [attachment deleted by admin]
  4. is it possible that one php file will redirect all the requested pages like this: for example when people type these addresses it will first go to redirect.php then depends on what they type after www.yoursite.com, it will redirect those pages. www.yoursite.com/firstpage www.yoursite.com/secondpage www.yoursite.com/thirdpage I know that for every request you can make a separate page but I just want one page to redirect all. Thanks in advance
  5. Hi Guys, php page worked in my localhost with no problem. But when I uploaded to web, it gave me this warning Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/takasa1/public_html/toupload/immigration.php:7) in /home/takasa1/public_html/toupload/immigration.php on line 38 Should I worry about this? I just put @ in the beginning to hide the message. Is that ok? Thanks in advance
  6. Hi guys, My captcha used to work perfect. But today I checked the sites in my localhost and no captcha image is showing in the forms. I am using wamp server. Do you know why this could happen? I didn't move image folder or other files. I didn't change anything since it was working perfectly .Thanks in advance.
  7. I solved the problem. I used $_POST[...] to take the value to top of the page then from there I used if and if else. Thanks for helping
  8. I thought about it but didn't want to mess things up. I will try that. Thank you. Is there any code that when the page reloads it goes to certain place in the page?
  9. Hi guys, I want to echo this code if(($countryfiled=="please select")||($visatype=="please select")) { $notice="<h3>PLEASE DO NOT LEAVE COUNTRY OR VISA TYPE EMPTY</h3>"; echo "<FONT color='red'>$notice</font>"; } at top of the page. Now it is echoing at the bottom. I don't want it to echo at the bottom of the page. Because visitor may not see it and think that their form is successfully submitted. But I don't know how to echo it on top of the page. Action is SELF. Thanks in advance
  10. I solved the problem. Thanks a lot. short_open_tag = On
  11. That's a good idea. But I have some study materials and almost all of them has <? instead of <?php. I will still use <?php but How can I change the setting so that it will recognize <? too. I checked php.ini file but couldn't do it.
  12. <?php works but <? doesn't work. I don't know why it is behaving that way. I have the latest version of wamp server. can you help? Thanks in advance.
  13. I realized something. First page url is like this: http://localhost/Copy_of_src/reciperesults.php?country=USA&typeoffood=DESERT&Search=Search When I go to second page URL is like this and of course there is nothing on the page http://localhost/Copy%20of%20src/reciperesults.php?pageno=2 Then I started to play with URL and came up with this which is working: http://localhost/Copy%20of%20src/reciperesults.php?pageno=2&country=USA&typeoffood=DESERT&Search=Search Problem is the same, I don't know what or how to do to get this result everytime when I clicked next or try to go to another page. I feel I am so close to result. I can even smell it but Still I can not touch it.
×
×
  • 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.