sKunKbad
Members-
Posts
1,832 -
Joined
-
Last visited
-
Days Won
3
Everything posted by sKunKbad
-
Theres an semi-outdated login script that is full featured over at evolt.org: http://www.evolt.org/PHP-Login-System-with-Admin-Features It's worth checking out. I say it's outdated because it lacks some necessary security features to combat session fixation and session hijacking. I think you could use it with a few modifications.
-
Is it possible to combine two sql queries?
sKunKbad replied to nishmgopal's topic in PHP Coding Help
I think what you might want is a sql UNION. -
Moved Javascript into .php file and now it isn't running?
sKunKbad replied to coreysnyder04's topic in PHP Coding Help
seems like it should work,, except for that you haven't shown where $skillLevel comes from. PHP can't get that from the javascript in the 2 previous lines. Its hard to tell what you doing until you explain that. also try changing <script language="javascript"> to <script type="text/javascript"> -
Moved Javascript into .php file and now it isn't running?
sKunKbad replied to coreysnyder04's topic in PHP Coding Help
you probably need to escape the quotes in the js -
More than likely, Godaddy has probably added something like this in your php.ini: disable_functions = "exec,system,passthru,readfile,shell_exec,escapeshellarg,escapeshellcmd,proc_close,proc_open,ini_alter,dl,popen,show_source" If you can alter this, then you might be able to do what you want to do.
-
You'll probably find that a large app that is slow will need more than a little tweaking to become efficient. You may find yourself rewriting the whole thing.
-
echoing an old value after its been changed??
sKunKbad replied to seany123's topic in PHP Coding Help
The value of $member['money'] wil never equal $money. $money is a variable, and $member['money'] is the money key of the $member associative array. Is this your problem? -
COULD THIS OVERLOAD OR CONTRIBUTE TO OVERLOAD OF MY SEVER?
sKunKbad replied to Orionsbelter's topic in PHP Coding Help
YES -
Help, 1000's lines of php and theres an error!
sKunKbad replied to CodeWriter's topic in PHP Coding Help
Just when you thought you were OK, IE strikes again! -
[SOLVED] I can't determine what the syntax error is
sKunKbad replied to yuckysocks's topic in PHP Coding Help
I can't see anything wrong with it. What line number is the error on? -
header errors on linux but not on windows still
sKunKbad replied to louis_coetzee's topic in PHP Coding Help
I had a similar issue recently. I use Notepad++, and Notepad++ defaults to saving files as UTF-8 with BOM. Once I saved as UTF-8 without BOM, the problem went away. -
If all there is is two choices, then just use a simple if statement: if($_POST['name'] == "Joe"){ $image = "joe.jpg"; }else{ $image = "mike.jpg"; } echo "<img src='$image' />";
-
Slimbox and IE6 and my sticky footer isn't sticky anymore!
sKunKbad replied to sKunKbad's topic in Javascript Help
Just a coincidence, but just after posting this, Smashing Magazine had an article about javascript that included a few suggestions for popular photo gallery scripts. Although not free, the Lightview script was the best I've seen, so I'm saving up to buy a license. I tested it against Slimbox, and it has no display issues in IE6. It's awesome. If you haven't seen it, you should check it out. -
Slimbox and IE6 and my sticky footer isn't sticky anymore!
sKunKbad replied to sKunKbad's topic in Javascript Help
Well, I did, but found that I couldn't fine tune the animation and background as well. Maybe I just need to play around with it more. -
On my website, www.brianswebdesign.com, I have implemented a sticky footer, but after adding Slimbox, a lightbox type photo gallery, the sticky footer doesn't stick anymore in IE6. Once a photo is clicked, the page corrects itself. I'm wondering if there is a way to make the page correct itself on load, so IE6 users don't see the non-sticky footer. You'd probably have to have a screen resolution with a vert height of higher than 1024 to see the problem, but this is the shortest page on my website that has the problem: http://www.brianswebdesign.com/current-projects.php This version of Slimbox isn't even the current version, but I don't like the current version, so that's not an option. Any suggestions?
-
It's right there in my sig. www.brianswebdesign.com ...and yes, you can call me magic
-
I have a menu like this on my website, and it requires no JS to work on IE6.
-
Unless you have a huge number of links, you might just store the links in an associative array. Then query the database with a simple query: $q=mysql_query("SELECT count FROM counter"); $row = mysql_fetch_array($q,MYSQL_ASSOC); // so you can use $row['count'] as the number to get the link you want $arr = array("1"=>"http://www.whatever.com","2"=>"http://www.whatever2.com"); echo $arr["$row['count']"]; //I can't do all the work for you, you'll have to figure out if I made errors if ($row['count'] == 2){ // 2 because there are only two elements in the array above, and they are numbered 1 and 2. mysql_query("UPDATE counter SET count = 1"); }else{ mysql_query("UPDATE counter SET count = ({$row['count']} + 1)"); } //This should steer you in the right direction
-
Probably the easiest thing to do would be to set up a mysql database of the URLs to link to, and then add a counter to the database. When somebody gets redirected, simply update the counter +1 unless it is at the last number (determined by the number of links). If that is the case, update the counter to zero, so it starts all over again. So, you need to learn some BASIC MySQL, but it shouldn't be hard at all. Just search for some tutorials on MySQL and PHP.
-
//This is the mysqli version. See the manual for plain mysql. function clean_for_query($data){ global $db; $data = mysqli_real_escape_string($db , trim($data)); return $data; } $clean = clean_for_query($_POST['dirty']);
-
oh yeah, and the mysql_real_escape_string function is pretty standard sql injection prevention
-
if your using php5, there the PECL filter_input function
-
I don't have an MSI Wind, but from searching around Yahoo, I found that people are definitely installing and using Ubuntu 8.10 on it. I run this OS on my Dell Mini, and it works great. I have zero problems. I'd recommend going over to the Ubuntu Forums and ask around there. http://ubuntuforums.org
-
8.10? Do you mean Ubuntu 8.10?
-
Hey thanks for your replies. I'm still learning more about my server, and also learning more about Linux in general.