Jump to content

Ads

Members
  • Posts

    162
  • Joined

  • Last visited

    Never

Everything posted by Ads

  1. Ads

    PHP notice

    I just want to get rid of it The most easy and painless way possible
  2. Ads

    PHP notice

    For this particle example I have a lot of variables, as it is a flag system for the members. Do i have to code each Variable in, or is there an easier way to do it.
  3. Ads

    PHP notice

    Hey I updated my WAMP server the other day and I am getting al of these Errors now. Notice: Undefined variable: ac in C:\wamp\www\xxxxx\newupdates.php on line 15 And there is about 25 of them on one page, and they are all over the place. Undoubtly it is my poor coding, but how come it never showed up before, and the site itself still works. Any help would be great, I basically wont to get rid of these
  4. >.< I meant Script Sorry, not string. Apparently I fail at spelling. I have however checked all my Database links and they are all working as they should be.
  5. Its only since I added the Remember Me Feature and altered the Log in string that it has had an issue with Sessions. I did have output_buffering turned on, after turning it off, and running the code locally, it still works but takes a lot longer to load, not sure if that is a sign of anything. I added that code in, and it didn't seem to show anything up.
  6. I have a Login Script with a Remember me Function. The Script works flawlessly on my local server but when I upload it doesn't work on my web server. From what I can tell its a Session issue, When I log in, I make a session with the user ID, in which is used to pull all there information on other pages. On my local host it makes the sessions and everything is dandy, but on the web server it doesn't seem to make the session. Can anyone shed any light on this, I'm clueless once again
  7. Ads

    PHP setcookie

    Thanks for your Help, once again you have saved me for a nightmare of over looking the simple facts. I was adding A style Sheet and an Apple icon in the Config file, Which the Cookie setting didn't like, It seems to all work now, Thanks
  8. Ads

    PHP setcookie

    When I try and set the cookie on the Server I get this Error: Warning: Cannot Modify header information - headers already sent by (output started at /home2/*******/Public_html/config.php:3) in /home2/*******/public_html/authenticate.php on line 58 Line 3 of COnfig.php is just an Open php tag. and Line 58 of Authenticate is the setcookie command. I echoed out the $_POST['rem'] and $mem['userid'] both come out as the values that they should. When I run it Locally it sets the cookie with the right value, when run on the server it doesn't set anything.
  9. Hey Guys, I am trying to set a cookie so that when I registered user returns it Auto Logins them in. I am able to accomplish this on my Local server but as Soon as I upload to a web server to test it, it doesn't work. Is anyone able to shed some light on this for me. $usass = $mem['userid']; if (isset($_POST['rem'])) { $year = 3600*24*365; setcookie ("id" , "$usass", time()+$year); } if the code for setting the cookie, and the code for checking the cookie is Below if(isset($_COOKIE['id'])) { $_SESSION['userid'] = $_COOKIE['id']; print "<script>"; print " self.location='loggedin.php';"; // Comment this line if you don't want to redirect print "</script>"; }
  10. Worked Perfectly, Thanks
  11. Is there a way to Reset a Database Field to its defualt value, using php? I want to be able to do this without Manually setting the number I want to field to update to?
  12. Ah Sorry. $id = $_REQUEST['id']; $db = mysql_query("SELECT * from weps where id=$id"); $a=mysql_fetch_array($db); Name: <input type='text' name='name' value=$a[name]>
  13. I am Pulling the name of an item from the Database into a Text Field, However if the name from the Database is more than one word it only Displays the First word and Curts off the Rest of the words. Do i need to add a PHP Command to tell it to not do this?
  14. Ads

    User Location

    Sadly that did not work, I think the Problem Lies with the global $page; As if i set page to equal anything right above the sql statment it works fine.
  15. This is Probabaly the most obvious thing, but i seem to overlook it I am trying to make a online users list, That i have made na ti works well, within the user list i am trying to add a section that display the current page the user is on. On each page I am adding: include "globals.php"; $page = "Home"; and then within the globals page I have: global $page; $db=mysql_query("UPDATE users SET location = '$page' WHERE userid=$ir[userid]"); But it Doesn't Update the Database at all. The Globals.php is included in every single page. Any Help would be Great
  16. Okay, Thanks. I Managed to get it working =D...for now Thanks Heaps Guys
  17. Okay, That does display the text within the box, But I want it to have Line Breaks, which only display as /n but i want them to be an acctual newline.
  18. Hey, I am trying to create a Personal Message system for my website. Creating it is no issue, But I am trying to add the feature so when you view the Message and go to reply to adds a "----------Original Message---------" To indicate the different Messages between teh two users. This is the code I am using to add the break to the $msg which is then submitted to the Database $msg=$_POST['msg']; $msg="<br><br>---Original Message---<br>".$msg; And this is the code I am using to Convert the string from the Database and it being displayed into a <textarea> $select_mail = mysql_query("select * from mailbox where id='$id'"); $b = mysql_fetch_array($select_mail); $h = $b['msg']; $h = str_replace("<br>", "\n", $h); It Displays It within HTML Fine, But it Displays Nothing when I try and put it into the <Textarea> for the user to reply with. Any Help would be Great, Sorry if it is a Bit Confusing =(
  19. Ads

    Cron Jobs

    Haha Wow as if i over looked that. That worked thanks heaps =) How would you propose i make it more secure?
  20. Ads

    Cron Jobs

    I am trying to run a cron job every 5 minutes. 5 * * * * php5 -f/home/sites/skyytemple/public_html/cron_fivemins.php The cron emails me saying "Could not open input file: /home/sites/skyytemple/public_html/cron_fivemins.php" Im unsure what to do to fix this, as the file is there i can run it manually through entering the URL (I havent secured as i am worrying mroe on trying to get it to work)
  21. Could you Elaborate on Both of those Ways Please
  22. I am trying to Update a PHP Clock, in a Separate i frame, Using Java script But to update it with a PHP Time. Not with a Javascript Based Clock. I want this to be done when u Load a Page in a Seperate Frame, THis is the code i was trying to do it with. Java Script Code: <script language="javascript"> var p = parent.document.forms.clock; p.clock.value = '0:0:0'; </script> PHP Clock (header.php) <?php include("include/db.php"); $date=date("G:i: s"); echo "<INPUT READONLY NAME=clock1 SIZE=4 STYLE='text-align: left;' class=.readonly value='"; echo $date; echo "'>"; ?> Iframe Code <iframe name='clock' src='header.php' width='160' height='55' frameborder=0></iframe> And this doesn't work, can Anyone help me out Cheers, Ads.
  23. okay Is that what it does, or what you want it to do?
  24. So what Exactly are You trying to do?
×
×
  • 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.