Jump to content

Kaboom

Members
  • Posts

    98
  • Joined

  • Last visited

    Never

Everything posted by Kaboom

  1. Use reCAPTCHA, it works really good for stopping them
  2. I have no code as far as calling it yet because im not even sure how to begin and I don't want to skrew up and make it load none or all of them like i probably will. Here's my database setup though for jobs: CREATE TABLE IF NOT EXISTS `jobs` ( `id` int(10) unsigned NOT NULL auto_increment, `position` varbinary(45) NOT NULL, `company` varbinary(45) NOT NULL, `posted` varbinary(45) NOT NULL, `ends` varbinary(45) NOT NULL, `wage` varbinary(45) NOT NULL, `category` varbinary(45) NOT NULL, `desc` varbinary(200) NOT NULL, `reqs` varbinary(200) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2;
  3. Say they want it to be posted for 30 days, how do I make it know what date that will be from now to put into the database and then when it IS that date, how do I make them now show anymore? :s I know exactly what I WANT to do, not sure how though.
  4. The script i am making allows people to post jobs for people to see but I want to be able to set it so you can have it show for a certain period of time (like 1-30 days) or have no time limit on the post. What's a good way to do that? I will store the date to show it until in the database if possible and then when it calls them don't get the ones that are past that date etc, but not sure as to how and the php.net manual didn't help
  5. I had another thread about a problem I was having where it's not loading from the DB right aways. My solution is to make an update function and then have the id's calling it on the page. So the thing I am wondering is how to make a working update function. I have this so far: <?php include blah.... $uid = $_SESSION["user"][0]; $avatarid = $_SESSION["user"][12]; function update($str) { global $db_id; $query="select ".$str." from users where id=".$uid; $result=mysql_query($query, $db_id); $row=mysql_fetch_row($result); return $row[0]; } ?> and then it's being called on the profile page with <?php echo update($avatarid); ?>. I want the update() function to select avatar from users where id = userid and then return the value fresh so it's getting it new from the database every time they refresh the page. Then there won't be a problem with updating old avatar stuff. Currently gives me the error: Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/root/public_html/func.php on line 69 So what am I doing wrong here? thanks for anyone who can help
  6. Double: Okay so I made an update function, will this work? function update($updateid) { global $db_id; $query="SELECT count(*) FROM users WHERE ID=$updateid"; $result=mysql_query($query, $db_id); $row=mysql_fetch_row($result); return $row; } Then for the profile I have it calling like echo update($avatar); Will this work to fetch the row and return the right answers right away?
  7. In the saving of the avatar it does currently update the SQL database with the info Now the problem there is that the data while being updates is only loading the data from the beginning of the session. Somehow I need the profile or accounts to always be updating/fetching the new data from the database.
  8. I have a session to check when the users login and fetch the details from their account but when they edit their avatar I want it to update the value right away. For it to change the value for the user they need to log out and back in, destroying the original session and recreating a new one on that account. Is there a way to have it always getting the data I need from the database while they're logged in? Because I don't want it to only get the orignial data in case they change a setting so they don't have to log out and then back in to change the setting. I hope you understand
  9. Im just trying to get the email from the database, it's not done yet. And the main page index.php includes global.php which includes all the other pages needed to run the core files. For some reason (and its including the files..) it won't get the db.
  10. I made a function for the emails but it's not working for some reason. I wanted to store my info in a db so the users can set their emails for paypal donations. well I got a problem. I used this code for my function: <?php function payments($email) { mysql_select_db($dbname, $db_id); $result = mysql_query("SELECT * FROM `config`"); while($row = mysql_fetch_array($result)) { echo $row['paypalemail']; } } ?> It's connecting because theres no db errors coming up and it loads db from a global.php file but i'm getting: Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/tyler/public_html/iblog/engine/payments.php on line 5 so "mysql_select_db($dbname, $db_id);" isn't a valid code anymore? all i'm getting is errors EDIT: if i take $dbname, off I get no errors but a blank page
  11. I can offer you a donate type script like this: http://secure.stephanddarryn.com/www/mod/donate/ If you want..
  12. No like login.php and index.php where in the same folder at one point in time. Ex: /home/user/public_html/www/ I then moved my login file to a new folder and renamed it to be the default in that folder. Ex: /home/user/public_html/secure/www/login/ For some reason now that it's in it's own subdomain the login script is not storing the session for my domain even with the code for php.session_domain and cookies at .stephanddarryn.com. For some odd reason it won't actually log you in anymore and I can't for the life of me get it to stay. Get what I mean? I'll try another thing and see if it works.
  13. Just noticed, so something like if ($start == "") { $start = "1"; } so if it's empty set it to one
  14. I include global.php and at the very top of that I have session_start(); and the part that's pissing me off about this is it used to work when it was in same folder but now it stopped.
  15. exec(“command″); I want somehting like that up there for my website but it has a very special purpose. We are currently running a vbulletin forum on my one site and well, there's a lot of jerks on there. So I added an IP ban command to the shoutbox, so from there I can ban users. I was wondering (since I hate the vb ip ban system) if you guys know how I can make this command run through cron or some other system (in a cPanel apache server) too add users IP adress to the deny ip manager list. I can have it add them to the .htaccess list if that works but idw it to rewrite my whole .htaccess file either.
  16. I HAD that there but it wan't working, I will have it added to my PHP.ini i guess.
  17. No. There isn't a session id that I know of
  18. When they login it uses $_SESSION["user"] = login($_POST["name"], md5($_POST["pass"])); and everything from there is in SESSION with user, like a temporary string or something
  19. I just edited mine, we were using that but it's not using cookies for the session so it will log them out after they close browser ini_set("session.cookie_domain", ".stephanddarryn.com");
  20. You can't view their PHP code since it's server sided not client. They are using JS to display the content but probably have it defined in a PHP varriable to load. Check the links they posted farther up and see that ..
  21. Because my entire script is coded around a session right now I don't want to convert everything to cookies because, as I have tried before, I always fail and it doesn't work regardless. Now we have two seperate places but the session won't stick, even when using the .htaccess thing. We have http://secure.stephanddarryn.com/www/login/ and it works and holds a session, IN SECURE but wont from http://secure.stephanddarryn.com/www/login/ to http://www.stephanddarryn.com/ for them to browse, which it is supposed to do. the subdomains make it look more professional but it won't hold, how can I fix this? EDIT: we were using "ini_set("session.cookie_domain", ".stephanddarryn.com");" but isnt working since not using cookies
  22. Tysm!!! IT worked perfectly I tried that before but had bad syntax lol
  23. A demo site of the code: http://tyler.geeksnetwork.org/demo/index.php goto the admincp and then you can edit the home.txt BUT when you do a link, <a href="" it makes it <a href\"\" even though I have strip slashes remove them... it only happens during post not load so if its in txt file already it works but if it isn't then you save with them it adds slashed and idk why.
  24. Okay were making an admin portal for our customers we do webdesign for but still host and for some reason it will not get rid of the \'s. Here's what I am using: $content = $_POST['content']; $fh = fopen("$path", 'w') or $message = " <br /><font color=\"red\">Can't open file.</font><br />"; stripslashes ($content); fwrite($fh, $content); fclose($fh); header("location: index.php"); It makes them redirect when it is done, shows an error if not, so ... why does it keep adding \'s? it can display it without them but it's randomly tossing it in there.
  25. Yes it is... see the thing is I have it now to post into a database and everything AFTER i get it to submit the scr. How would I post score from there? like something like $score = $_GET['scr']; Now how would I make this auto post like: Post $score then have it subit it to the next page autoatically without the user seeing the actuall scoring page at the start. Remember, this is loading from an offline file to online so it's not posting from there its loading a file and that file needs to post after visinging without them clicking anything
×
×
  • 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.