Jump to content

ttocskcaj

Members
  • Posts

    184
  • Joined

  • Last visited

Everything posted by ttocskcaj

  1. Try this $query = "SELECT * FROM bd WHERE ....."; $data = mysql_query($query) or die(mysql_error()); $anymatches=mysql_num_rows($data); if ($anymatches != 0) { echo "text"; while($row = mysql_fetch_array($data)) { echo "text"; } } if ($anymatches == 0) { $query2 = "SELECT * FROM bd WHERE....."; $data2 = mysql_query($query2) or die(mysql_error()); $anymatches2=mysql_num_rows($data2); if ($anymatches2 != 0) { echo "text"; } else { mysql_query("INSERT INTO notfound (notfound) VALUES ('$var')") or die(mysql_error()); } } Looked like your {}'s where messed up.
  2. You don't need the curly braces {} if a block is one line. if ($trimmed == "") echo "<p>Please enter a search...postcode</p>"; exit; Should work. I'm not sure what you're trying to do here? Are you trying to return a phone number to match a post code? or something like that? How is your DB structured?
  3. Cool thanks for the advise necken18 I'm not sure what you mean? What line have I mixed them?
  4. What do you think of my user class so far? Room to improve, things to change etc. I'm still getting the hang of this oop thing. http://pastebin.com/fPFk21k4
  5. That's weird, I swear it was transparent lol. And you can change the colours if you log on.
  6. Yes, I'm definitely better at php than doing css and html lol
  7. Haha. I think my colour themes need a bit of work though. Some are a bit ugly
  8. Give this a go, see if you can understand it. http://pastebin.com/L07Lv6XS
  9. I'm with 1and1 and it's limited to 100MB and I'm sick of their firewall stopping me accessing it remotely.
  10. It's pretty easy, you just have to make a new php script to link to. For example the page that displays the list of teams might be index.php And the one that displays the team players might be team.php That way you can link like echo '<a href = "team.php?team='.$row['Team_Name'].'"> . $row['Team_Name'] . </a> That way the team name is passed to the team.php script via the get method, (notice the ?team= at the end) Then in the next page you can select the row that has that teams details. use this: http://pastebin.com/N8iUViEj as an example. I have to go so I can't write the whole thing for you.
  11. Is there no such thing as a company that provides just database hosting without having to buy a whole hosting package (http, php, domain etc)? I've tried searching and found nothing
  12. Any reason it's regrettable?
  13. Have you tried listing all the games in a database? That way you can search through them, you could also make an admin end where you can easily add a new game via your browser. Kind of like a blog/forum post sort of thing.
  14. Hey. Tell me what you think of my new website so far. At the moment it's only about half way done, but I want to test the user interface etc to make sure it's easy to use and everything works how it should. I already plan on adding more js etc and there's a couple of broken links. If you don't mind, register yourself as I need that tested to . If you really don't want to you can use email: [email protected] pass: test http://www.culture-mash.com
  15. Cool. Thanks for the suggestions guys
  16. I'm working on a Social Network from scratch. I'm stuck on how to store friend relationships between users? On one topic here, I found an idea. Have a table with 3 columns; id,user_1,user_2 each relationship would have a new row in the database. Would this be the best way to do this? I can imagine the table would get quite big. If each user has 100 friends and there's 10000 users that's 1000000 rows. etc
  17. That's why I said use sql lol. I think that's possible. but not as easy
  18. Only on my testing server.
  19. Nevermind. I found http://qwebirc.org/
  20. lol I always use root
  21. Do you know how to use mysql? It would probably be easier in the long run than using a txt file. And yes it's possible
  22. What is a good open source irc application to use as a web chat. Does such a thing even exist. I know there's mibbit etc, but these are just embedded into a site with html.
  23. Hi I'm trying to get my script to send emails using the PEAR mail function but I keep getting and error code. include('Mail.php'); $from = "My email"; $subject = "Heoli Verification"; $body = "Hi,\nClick this link to activate your account\n".$validate_link; $host = "ssl://smtp.gmail.com"; $port = '465'; $username = "my email"; $password = "my password"; $headers = array ( 'From' => $from, 'To' => $email, 'Subject' => $subject); $smtp = Mail::factory('smtp',array ( 'host' => $host, 'port' => $port, 'auth' => true, 'username' => $username, 'password' => $password)); $mail = $smtp->send($to, $headers, $body); if (PEAR::isError($mail)) { die("<p>" . $mail->getMessage() . "</p>"); } else Rest of code... Error message: Failed to add recipient: @localhost [sMTP: Invalid response code received from server (code: 555, response: 5.5.2 Syntax error. v13sm4079748wfv.17)] php 5.3.1 with XAMPP
  24. I think I've fixed it. It was something to do with phpmyadmin having the char limit at 20.
  25. Wait, I see what you mean. The error has the query in a different format from the query in the php.. I'm just going to say it's something wrong with the server. Sometimes it works, others it won't. :'(
×
×
  • 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.