Jump to content

ScottRiley

Members
  • Posts

    59
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

ScottRiley's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks for the reply, the guy I'm workign with who handles all the server problems and settings is waiting to hear back from the hosting company, probably won't be until Monday though. Thanks again, Scott
  2. Hey guys, I hope you can help me with this, it's got me stumped! I've implemented a log on system using session, easy, right.  Well, everything is working fine and as one would expect EXCEPT for pages I've uploaded recently.  It started a few weeks back when I uploaded soem files that use the sessions.  I got an error similar to: Warning: session_start() [function.session-start]: open(tmp/sess_d5aca8cc3e34417c70537a107ec81e0a, O_RDWR) failed: Permission denied (13) Simple really, my hosting company has probably made some changes to their server, so I just need to change the session save path, right?  So I throw in session_save_path(../sessions);  (../sessions is a folder I created, gave it write access etc).  Things started working fine again until a few days ago, I get the same error: Warning: session_start() [function.session-start]: open(../../sessions/sess_d5aca8cc3e34417c70537a107ec81e0a, O_RDWR) failed: Permission denied (13) Now, this file has write access enabled etc, and sessions were saving to it for around 4 days, but recently its playing up again.  I'm stumped really, not sure where to go.  This is happening to all pages I have uploaded recently, I even copied and pasted the code for one of my files EXACTLY and saved it as a different name...same error.  The code hadn't been changed at all, so I'm sure its nothing to do with the way I've been coding my pages.  So, my next idea is, what if its the computer I'm working on?  What if my internet options/configuration of my hosting company's server aren't letting me write to the folder.  But teh pages that were working in the past STILL work now.  I can go onto a page I created MONTHS ago, log in, create the session and have this session information made available to me with no problems at all, so I eliminated this problem. So, after countless headaches thinking too hard how to solve this, I turn to you for guidance and to tell me what the hell is going on. Thanks a lot in advance, Scott
  3. If you'#re creating a file using fopen, you need to include "w+" e.g. to create the file "newfile.txt" use [code]<? fopen("newfile.txt", "w+"); ?>[/code]
  4. I think the $_POST indicies need to be in quotation marks.  Instead of $_POST[submit] you need $_POST['submit'], but I'm not sure  ???
  5. Hi.  I'm looking for a function/code that will store the number of uses logged in to my site.  I already have teh login form and everything set up, all is going fine, but I was wondering if there was any way to get the number of users loggedn-in.  I've searched google but failed to find anything useful. Thanks in advance, Scott
  6. Personally, I prefer to store the query as a string, and then call it using the variable.  For example: [code]<?php                   $query"INSERT INTO logins (UserID, URL, Time) VALUES ('1', '2',' 3')";                   mysql_query($query); //basically the same as what you done, except you have the sql  syntax stored as a variable, which is useful [/code]?> This way, like onlyican said, if anything goes wrong you can always 'echo $query' to ensure that all the variables are being passed correctly.  Other than that, onward and upward it is ;)
  7. Yeah, you need a mysql_query($query) somewhere, all that code does is declare a variable '$query'.
  8. +1 to that.  Why the hell would we write code for you to use as a spam program? Furthermore, its insulting that you ask for someone to completely rewrite code for you, if you want to know HOW to do something, I'm sure someone could help, however, simply asking someone to write the code for you for FREE is audacious.
  9. If your ID is set to auto_increment, use the value 0 as opposed to null.
  10. Yeah, you need to sort your strings out, there's no need for closing the quotes and adding the semicolon, just wrap the whole string in a set of quotes.  you do the same for your e-mail header variable too, change it so that the string is wrapped in quotes, without the semicolons at the end, like hostfreak said.
  11. Yeah, you're missong a variable for 'title'
  12. You posted your upload function twice, instead of your upload and viewing functions. Don't the properties of a form need to be in inverted commas? i.e. <form name=upload> should be <form name="upload">?
  13. Thanks a lot bbaker, its sorted now, I just removed it like you said.  Thanks ;D
  14. [code]$sql="SELECT * FROM southport_businesses"; $result=mysql_query($sql); $rows=mysql_num_rows($result); $array=mysql_fetch_array($result); code] [/code]
  15. So, I'm trying to echo all the results of an array I achieved from a query, simple enough: [code] <?php             echo"Welcome ".$_SESSION['username']."!<BR>"; echo"You have ".$rows." Business members:<BR>"; while($array=mysql_fetch_array($result)) { echo "&nbsp;&nbsp;&nbsp;&nbsp;".$array['Username']."<BR>"; }               ?>[/code] However, this tells me I have 6 business users, but only echos 5 of them.  I checked the database, and I DO have 6 users, so why is it just echoing just 5? Thanks in advance Scott
×
×
  • 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.