Jump to content

CincoPistolero

Members
  • Posts

    118
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Male
  • Location
    El Dorado Hills, California

CincoPistolero's Achievements

Member

Member (2/5)

0

Reputation

  1. I went to the link provided in the last post, and it worked seemlessly. My only question is, if I want to make sure that the most recent record seen is no later than TODAY'S date, how would I go about that? Currently, the code loads all records in the table. $query = "SELECT COUNT(*) FROM table"; Can I make that only select records up to today? I do have a column that caputures 'date' for each record.
  2. I want to create a menu like below << previous next >> where '<<' takes us to first record in array and 'previous' only goes back one. 'next' goes forward one and '>>' goes to end of array. I've been trying to google search for examples, but I'm not sure what to google. Does anyone know what this logic is called, or know of any examples of doing this.
  3. Yes, the below worked. I just set it on the page having the issue. ini_set('session.bug_compat_42',0); ini_set('session.bug_compat_warn',0);
  4. I found this link - http://preetul.wordpress.com/2007/05/07/your-script-possibly-relies-on-a-session-side-effect-which-existed-until-php-423-please-be-advised-that-the-session-extension-does-not-consider-global-variables-as-a-source-of-data-unles/ I then switched my session variables to the below and I still get the error. Once again, I don't have the ability to change the php.ini file. /*this is where i need to work some session table magic */ session_start(); $logdIn = $info['loggedIn']; $_POST['uname'] = stripslashes($_POST['uname']); $uname = $_POST['uname']; $pwd = $_POST['passwd']; $aType = $info['acctType']; $_SESSION['userName'] = $uname; $_SESSION['password'] = $pwd; $_SESSION['accType'] = $aType; $_SESSION['loggedIn'] = $logdIn; $db_object->disconnect();
  5. here is the error Warning: Unknown: Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. Hosting server is php 5x. I'm not passing any variables from one page to another, just session variables page1 session_start(); $_POST['uname'] = stripslashes($_POST['uname']); $_SESSION['userName'] = $_POST['uname']; $_SESSION['password'] = $_POST['passwd']; $_SESSION['acctType'] = $info['acctType']; $_SESSION['loggedIn'] = $info['loggedIn']; $db_object->disconnect(); ?> <script language='javascript'> location.replace('../appl.php'); </script> page 2 <?php session_start(); $applName = $_SESSION['userName']; $query = "SELECT * FROM table WHERE userName='$applName'"; $result = mysql_query($query) or die ("Error in query: $query. " . mysql_error()); $row_emp = mysql_num_rows($result); if($row_emp > 0){ $row= mysql_fetch_array($result); extract($row); }else {} $applUserID =$row['pwUserID']; $_SESSION['pwUserID'] = $applUserID; if ($row['firstLogin'] == 0) { //Change password and set Security Question ?> I know I've been forced to use $_GET when passing variables from page to page, but I don't believe that is what is causing this error. Also, this is on a shared server, so I can't edit the php.ini file. any help would be mui appreciated.
  6. I changed this <div id="pwbanner"> <img src="../images/topbanner.jpg" width="834" height="115" border="0" /> </div> to this <div id="pwbanner"> <img src="../images/topbanner.jpg" width="834" height="115" border="0" /></div> and it works. go figure
  7. I have what should be simple, but alas, isn't. I have a test page that all the pieces fit togehter. the test page is just html header stuff. then a css header section, body section and footer section. the body has some plain text. When I copy and paste the css from the test page to my normal pages that contain html and php code. I get a slight break between my css header div and the main body div. Below is my php page info plus my css. Can anyone see an issue. CSS Header <center> <div id="container"> <div id="pwbanner"> <img src="../images/topbanner.jpg" width="834" height="115" border="0" /> </div> CSS Body <div id="login"> CSS Footer <div id="pwfooter"> <img src="../images/btm.jpg" width="834" height="102" border="0" /> </div> </div> the CSS #container{ margin-left: auto; margin-right: auto; margin-top: 10px; padding: 0px; width: 834px; } #pwbanner{ width: 834px; } #pwfooter{ width: 834px; } #login{ margin-top: 0px; margin-left: auto; margin-right: auto; padding: 0px; width: 834px; background-image: url(../images/bkg.jpg); }
  8. I want the regex to see the space and not error on it. I'll then remove it later in the php code. But, for now, the regex below triggers and error when it sees the space. It should see the space and not care (!preg_match('~^[0-9.-[:SPACE:]]+$~',$_POST['phone']))
  9. How about if user uses a space like this 444 4444. When I error check, the below fails if (!preg_match('~^[0-9.-[:SPACE:]]+$~',$_POST['phone'])) { It does not like the space
  10. I'm trying to only input numbers into the mysql DB. So when someone does this 333-3333 or 333.3333 I"m trying to strip out anything but the numbers. Below is the code I'm using $phoneNum= preg_replace("[^0-9]", "", $phone); This however, is not removing the dots or dashes. Any clues as to how to do this
  11. I have a form that when submitted gets sent to another page. This second page does form validation with regex. When an error is encountered, I tried using javascript:history.back() but it won't return the previous page, it tells me the webpage has expired. So, I'd like to be able to return to the previous page and retain what had been entered. Any ideas or hints appreciated.
  12. I have text box that users enter data into. I want them to be able to hit the enter key to create a new line. When they submit data to DB, it goes to a confirm page. I'm using stripcslashes so that it does not display the \r and \n. However, when I do this, it does not display the returns anymore. Is there a different method I can use?
  13. I also found this <? echo "Original Time: ". date("h:i:s")."\n"; putenv("TZ=US/Eastern"); echo "New Time: ". date("h:i:s")."\n"; ?> Here: http://www.modwest.com/help/kb5-258.html
  14. I have a page that displays current date. Cool. Problem, It appears that the server is in central europe. So here it is 3pm in California and my page thinks its tomorrow. Below is how I get the date. Is there a way to change this so it subracts like 9 hours from the current server time. createdDate= date("F j, Y");
  15. OK, I swear I had this in here yesterday, but it appears I was lacking $resultmd = mysql_query($sql) or die ("Error in query: $sql. " . mysql_error()); is working now.
×
×
  • 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.