Jump to content

melloorr

Members
  • Posts

    142
  • Joined

  • Last visited

    Never

Everything posted by melloorr

  1. echo "<a href=\"preordering.php\"><img src=\"img/top_banner_'.$_SESSION['session_idioma'].'.jpg\" width=\"744\" height=\"182\"></a>\"; Does this work for the top one? *Nevermind Ignore mine *
  2. I don't know sorry. I am not familier with mysqli
  3. if you ad an id to the database, I.E. variable 1 will have id = 1 variable 2 will have id = 2 etc. Then this may work, but bare in mind I have not tested it: $i = 1; while ($i <= 20) { $query = "SELECT whatever FROM whereever WHERE id = '$i'"; $result = mysql_query($query)or die(mysql_error()); $whatever$i = $result; $i++ }
  4. I am not sure if this will work, but if you put this in a variables file: $query = "SELECT * FROM whatever"; $result = mysql_query($query)or die(mysql_error()); while($row = mysql_fetch_assoc($result)) { $whatever = $row['whatever']; } Just type in all the variables you need then you can call them when you want them. EDIT Won't work, I do not think it is possible without having something to compare it too.
  5. I am confused about what you mean. One field is just ONE little box in a database. You get columns which are like 'username' or something then you get rows which list the values in a row like 'melloorr'. Do you mean column?
  6. Login security is tedious. mysql_real_escape_string will not make it more secure, it will only stop SQL Injection. $myPassword=$_POST['myPassword']; $salt = uniqid(mt_rand(), true); $myPassword = sha1($salt.$password); And store the $salt in the database. Just make sure that when they log in, the password is compared with the password in the database like this too. So when the user enters a password, you will have to call the $salt from the database, then do exactly what you did in the registration page, then compare the password the user entered, with the one in the database.
  7. 1. No 2. No 3. Maybe but they will not go there often. 4. Crawlers/Search engines do not need to go/link to that page. Just stop crawlers going there using robots.txt
  8. melloorr

    php ftp

    As I said in your previous thread, MediaFire is sufficient for your needs. Having people download from your website will only increase your bandwidth usage, thus costing you more money. Money which wouldn't have needed to be spent in the first place. Plus, if too many people download at one time, your server will slow to a crawl.
  9. melloorr

    php ftp

    It means File Transfer Protocol and it is used instead of http (i.e. ftp://www.example.com/). It is mainly used in uploading files to sites, (like through FileZilla) but it can also be used to download from sites. I do not know HOW to use it though, but someone else should be able to tell you
  10. It is the best method (other than perhaps ftp). The file would not be there for every person to see, only those with the link could download it.
  11. Just upload to mediafire and link to it from your site.
  12. How did you install php? Through xampp or a similar program?
  13. It means getting rid of excess spaces. I.E. $hello = " Hello!"; trim($hello) Would get out the spaces at the beginning. So it will effectivly be $hello = "Hello!";
  14. Hmm not sure. If you are getting the right size when you use echo, then how about putting it in a variable, then calling the variable? $file = $_FILES["upload"]["size"]; if($file < 1024000){ echo'entered if statement<br />'; } else{ echo'entered else statement<br />'; }
  15. How about using the filesize() function: $filename = 'somefile.txt'; if(filesize($filename) < 1024000){ echo'entered if statement<br />'; } else{ echo'entered else statement<br />'; } Just use variables or a form to get the file
  16. Then the only possible reason is that it didn't install properly. Did you install in manually, or did you use a program like xampp? If you did install yourself, uninstall and try using xampp or a similar program.
  17. Well, I am assuming you are accessing your website through localhost/yoursebsite/index.php or just localhost/index.php ?
  18. Are you using a host service like godaddy or something. Or are you using a localhost, i.e, YOU installed php on your computer. If you using neither, then you will not see any php.
  19. What cant you display them either? With double quotes, you do not need any ' around your link: echo "<a href=test.php?v4=Utah>Places</a>";
  20. Why not store both image paths in a db then SELECT * FROM images WHERE thumb ='$thumb'; Then just link to the larger image by using: $largeimg = $row['largeimage'];
  21. I just wanted to know if storing the images as numbers (i.e. 1.jpg), would be okay or if it would be best taht I use text instead. If i store it as numbers, then i wouldn't have to specify a name
  22. They are not stored in a database as such. They are stored in a folder, but I have the image names stored in the database so they are easier to call
×
×
  • 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.