
melloorr
Members-
Posts
142 -
Joined
-
Last visited
Never
Everything posted by melloorr
-
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 *
-
Help Assigning Query Rows to Different Variables
melloorr replied to dmhall0's topic in PHP Coding Help
I don't know sorry. I am not familier with mysqli -
Help Assigning Query Rows to Different Variables
melloorr replied to dmhall0's topic in PHP Coding Help
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++ } -
Help Assigning Query Rows to Different Variables
melloorr replied to dmhall0's topic in PHP Coding Help
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. -
Help Assigning Query Rows to Different Variables
melloorr replied to dmhall0's topic in PHP Coding Help
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? -
Better Password Protected Pages / Login Form .. ??
melloorr replied to spacepoet's topic in PHP Coding Help
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. -
WHERE whatever LIKE 's%'
-
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
-
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.
-
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
-
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.
-
trim($username);
-
Just upload to mediafire and link to it from your site.
-
how to install PHP_MYSQL driver?
melloorr replied to Aman Grover's topic in PHP Installation and Configuration
How did you install php? Through xampp or a similar program? -
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!";
-
Problem Checking File Size if else statement
melloorr replied to kasitzboym's topic in PHP Coding Help
Glad you solved it. Merry Christmas! -
Problem Checking File Size if else statement
melloorr replied to kasitzboym's topic in PHP Coding Help
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 />'; } -
Problem Checking File Size if else statement
melloorr replied to kasitzboym's topic in PHP Coding Help
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 -
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.
-
Well, I am assuming you are accessing your website through localhost/yoursebsite/index.php or just localhost/index.php ?
-
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.
-
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>";
-
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'];
-
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
-
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