Jump to content

rmpotter

Members
  • Content Count

    40
  • Joined

  • Last visited

Community Reputation

0 Neutral

About rmpotter

  • Rank
    Newbie
  1. this looks perfect. Thank you for your input
  2. I am looking for some input for a simple site I have been asked to make.Basically, I am looking for a decent way to allow a user to edit the news text in one DIV on a site driven by PHP. I am not familiar with how this is usually done, should I just use a simple text box or is there something more elaborate someone could point me too?
  3. thanks, i'll give it a try
  4. I am looking for a simple way to save a date to MYSQL and then later extract it and add 60 days on to it. I am unsure the best format to save the date as for later extraction, currently I am using SQLs curdate() but feel using PHPs Date() may be easier to add time. Any ideas?
  5. Alright, so I replaced what I wrote, with what you wrote.. and the only difference between yours and mine was that yours outputted the session uid, which I actually have tried, to confirm what the uid was, and it outputted programmer every time. But regardless, I copied yours in, and I edited yours to be like this: /* if ($_SESSION['uid']!='programmer') { header('Location: index.php'); exit; }*/ if ($_SESSION['uid']!='programmer') { if(isset($_SESSION['uid'])) { echo $_SESSION['uid']; } header('Location: index.php'); exit; } so basically I just threw in the header redirection in so it did something.. and it worked... so I don't get it. what I just did was I made yours into mine... which is dumb, I know, but I've tried so many different things, that all I'm left with are dumb alternatives. So basically, I changed your code to this: if ($_SESSION['uid']!='programmer') { header('Location: index.php'); exit; } And that is EXACTLY like my code.. except it works. PHP does this to me sometimes, and stumps me how it fixes itself. I know, you probably think I'm missing something, but this is what happened. Anyways, thanks.. it seems to work, atleast for now. If it sporadically ends up stopping working, like it sporadically started working, I'll let you know though!
  6. Alright, so I have this code: <? if ($_SESSION['uid']!='programmer'){ header('Location: index.php');exit; } include_once ("header.php"); ?> even when the uid is 'programmer' it redirects me to index... I obviously don't want this to happen.. if the user ligged in successfully as programmer, I want him to go to the correct page. Can anyone please tell me why this is happening?URL - http://nait.jtlnet.com/~fpkj5v0r/index.phpUser: programmerPass: prog123After you login, you can see that the uid is programmer, because I output it to the screen (it's on the banner, beside Logout)Please help, I've been trying different things, and I'm stumped!
  7. ooohhh man, classic case of not clearing my cache.. I'll never learn!Thanks everybody I truly appreciate the help! I love how forums work, and I love the people that work on them!
  8. Oh, I forgot to mention, the response is empty for the link that calls the ajax... In fact, I will give you the URL for the site.Keep in mind, this is a dumbed down site, so I can practice little things on... and these little things are now giving me a headache.http://nait.jtlnet.com/~fpkj5v0r/programmer.phpgo to the guestbook, and read guestbookif you write in the guestbook, it does get entered, so that is good.
  9. I don't seem to be getting any javascript errors.The firebug tells me the headers contain: text/plain.I'm not sure where to check the responseText property though.
  10. So I changed the x variable to global, and it still didn't work :)Also, yes, I do end the div. I thought this was gonna be easy. I just want to view a text file in the damn div. The content of the text file is enclosed with the <pre></pre> tag.
  11. Hello. I'm doing something very simple, and yet it's not working.. maybe I'm missing something.I need to read a text file, through ajax, and into a div. I can easily write to the file through ajax, but not read. Here is what I have: function ajaxLoader(url){if(document.getElementById){var x = (window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : newXMLHttpRequest();}if(x) {x.onreadystatechange = function() {if(x.readyState == 4 && x.status == 200) { el = document.getElementById('content'); el.innerHTML = x.responseText; } }x.open("GET",url, true);x.send(null);}} <a class="blocklink" href="#" id="readg" onclick="ajaxLoader('guestBook.txt');return false;">Read The Guestbook</a></p> <div id="content" style="width:600px;"> I've been stuck on this all day. I am able to use all of the same code, and output a regular html file to the div, but not this .txt file. The txt file has all of the read write privileges it needs. At one point, I also changed the ajax to open a normal html page into the div, instead of a txt file, and it worked as it should. So my problem seems to be opening the text file itself...
  12. I am having trouble trying to figure out how to update my sidebar using ajax.Right now I have an open button on my sidebar that loads up some php in another div. The SQL selected in this div is supposed to the propagate back to the div containing the sidebar.Any ideas?
  13. Unfortunately, that's what I figured. I will fool around with it an post a solution for anyone interested.
  14. Currently I am attempting to pull some data using:$sql="select * from inspect_erp where inspection_id = ".$myid." ORDER BY erp_type";the fields in the table areerp_id, inspection_id, erp_type, gpslocationBasically, I am looking to alter this to have the SQL order by the most commonly occurring erp_type to the least occuring. Can anyone help me out?
  15. sorry, wrong url. Here it is:http://www.charmscorp.com/inspect/projects.php
×
×
  • Create New...