Jump to content

cybercrypt13

Members
  • Posts

    17
  • Joined

  • Last visited

    Never

Everything posted by cybercrypt13

  1. Well, first off, if you're worried about variables hanging around you don't quite understand php. Because it is only running on a page by page basis there really is not much need in garbage collecting. javascript is the same thing. You aren't really running a compiled application that stays up in memory all day. Secondly, your example for the query only really holds true if you're really getting a single record or a single field. Otherwise you are just reading the row into an array and accessing it through the normal array methods. The -> method is really nothing more than a class access method and I guess a function might classify in php terms as a type of class even though its not being defined that way. I would agree that is a bit strange to me why that would work at all. I do not agree with your code being easier accessing the functions return value the way javascript does. Its not quite as obvious what is going on when you start trying to debug stuff. I prefer getting the return variable back and then doing with it what I want. No other programming language works the way javascript does with respect to getting those arrays back, or at least no major language. Anyway, we're arguing about something that is pointless. PHP does not work like javascript. so if you want to use php, use it. You could always go to ASP if you don't like it... :-)
  2. but that would be the only thing that works. I'm not following where your problem is. lets start over... 1) where is $JobID coming from? It can only be a $_GET if a previous page (not the one you are on but the one before it) pushed it to you. You are trying to push it to yet another page so I'm assuming you got the var from the previous page and are trying to push it off to the next. If this is not the case then it will not work. 2) If in fact the $JobID came from the previous page and you can echo it then what you're doing will work. However, the fact that you say echo $JobID works, I suspect you are not in fact pushing that var from the previous page and you think you are going to use something that hasn't moved yet. So yes, one of us is very confused... :-)
  3. I'm confused... Just because you are displaying a popup, why would you not have access to the php session var? You wouldn't have to clear it on the close event, you can destroy the session var on the load of the popup. On first line of file after session start of course, does var exist? yes, check box, clear var, now show popup... From that point on the var has been turned off. It would only get turned on if the user did whatever it is you want them to do that would reset it back to true...
  4. Only way is with a hidden field but if you'd like better opinions you need to provide a little better example of what you're trying to do. You talk about getting rid of a session var but that is extremely easy to do. Again, provide a little better example of what you're trying to do and maybe we can help more.
  5. The only time I've seen that function not work is when you accidentally send other html code ahead of it. If you only have a single php file and that is all that is in it then it should work. Also note: Your server must support either php inside an html file and must support php... These are not necessarily default settings on all servers. Good luck,
  6. I don't even understand your even needing a function. If you're end goal is to have the function do nothing but act as an array then just create an array and forget the function... Your example is not a very clear example to accomplish anything useful so not sure what else to tell you.
  7. You also did not read my previous post because you still don't have a semi colon after that $_GET sequence which is required. glenn
  8. actually I think you are confused. You seem to be trying to use the query string before you get it. That Get part needs to be done on the myfile.php file you are calling, not on the page that is setting up the link. YOu can't use it until you push it to the next page. glenn
  9. What exactly are you trying to do because this function makes no sense. You seem to be telling it to retrieve a single item from the function array (which you did incorrectly anyway) and then your function returns the entire array. If the function is going to return the entire array then why pass in legs? The previous poster got you going on the function layout as yours is no where close to correct, but you might want to share a little more info as what you're doing doesn't make a lot of sense. good luck,
  10. Well, honestly I don't believe I'd be going to all that trouble. I think it might be a bit easier if you actually have a single page that does all of that. Enter the zipcode, post back to the same page where you have a couple if statements. If you have a post back var $_POST[... then you do one thing and display your need to enter more info, or found it and moving on, or found more than 1 please choose. Doing redirects is not what you want to be doing because they don't carry over fields. You are basically telling the server that you don't want to be here so please go there. Nothing goes along with you. hope that helps,
  11. try adding a semi colon after your $jobid; ?>
  12. Maybe I'm missing something but what exactly are you trying to do here? A redirect is not going to post vars over with it. This is not how you do a post. You basically have 2 ways to deal with this as far as I know. 1) You can do a form post event to hook a post page to a button which automatically will send over your fields, or you can pass things over with a normal html link and pass the fields as query strings. <form name="Login" method="post" action="index.php"> <input type="submit" value="<?=$lang[ "LoginButton" ]; ?>" onclick="" id="btn_Login" /> </form> Or query string: --a href="http://www.mydomain.com/index.php?var1="hello">click me</a> Hope that helps...
  13. Yes, Its been restarted a number of times with no real effect... thanks,
  14. I've spent the last 3 days trying to get PHP 5 to show errors. I've changed the php.ini file to use E_ALL as well as combinations of things. If I use combinations I seperate with a Pipe. I had things working perfectly but had changed the php.ini file itself and Cpanel has reset things back to what they were. As a result I changed them again through Cpanel and see the file correctly being modified so it looks just like it did before. However, nothing I do will get things going. If I have a page with an error it displays only a blank page. I added error_reporting(E_ALL); to the page and got errors to show up on one page. Tried on a second page and nothing. Same settings on both pages. I'm not sure what to do as I've run out of ideas and nothing is working. please help,
  15. I need to clarify a few things now that I better understand the problem. I have a function.php that stores a bunch of functions one of which connects to the db. This function accesses a session var to determine the name of the db and its always worked perfectly for years. Now, upon trying to access the sessionvar it is finding it to be an empty string, despite the fact that the variable exists on other pages. I have the session_start(); line as the only line directly after <? and again, none of this code has changed so it has to be something on the server thats caused this to act this way. Any ideas?
  16. Thats not an answer but a restatement of the obvious. As I stated, nothing has changed in our source code so I don't see how it could possibly have problems. Something has changed in the configuration on the server somewhere that has caused this problem. its the only thing that makes sense. I've checked the global property in php.ini and its turned on. However, there are more than one php.ini file. Can anyone tell me how to determine which one is being used by php? THanks,
  17. We had a website that worked perfectly up until Friday. Since Friday when we open a page we get the following error. No code changes within the site took place so this has to be some sort of configuration problem but I don't know what. Can any help? Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/softekso/public_html/tbamu/functions.php:68) in /home/softekso/public_html/tbamu/main/body_header.php on line 2 Thanks
×
×
  • 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.