Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by sepoto

  1. <script type="text/javascript" src="jquery-2.0.3.min.js"></script><style>.canvas { position:relative; height:550px; width:400px; background:Yellow url("http://www.mapstop.co.uk/images/uploaded/lrg_wg2668.6a40d0d.jpg") no-repeat;}.canvas img { position:absolute;}</style><div class="toolbar"><span>Drag...</span><img src="http://cdn4.iconfinder.com/data/icons/iconsland-weather/PNG/48x48/Sunny.png" alt="" title="" /><img src="http://cdn4.iconfinder.com/data/icons/iconsland-weather/PNG/48x48/Thermometer_Snowflake.png" alt="" title=""
  2. I am reading this from the PHP documentation: RequirementsFor the Mail functions to be available, PHP must have access to the sendmail binary on your system during compile time. If you use another mail program, such as qmail or postfix, be sure to use the appropriate sendmail wrappers that come with them. PHP will first look for sendmail in your PATH, and then in the following: /usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib. It's highly recommended to have sendmail available from your PATH. Also, the user that compiled PHP must have permission to access the sendmail binary. M
  3. http://jsfiddle.net/sepoto/BrZgj/ <!DOCTYPE html><html><head><title>Page Structure</title><style>#wrapper{width: 1000px;min-height: 75px;background-color: grey;}#inner{margin: 12px auto 0px auto;width: 900px;min-height: 25px;background-color: red;}</style></head><body><div id="wrapper"><div id="inner"></div></div></body></html> I am wondering why adding an upper margin to inner seems to move both the grey and red div's down. I wanted to move down only the red div so that there is some grey st
  4. I came up with this which accomplishes the goal but I'm still not sure if this is the best way... if ($stmt->execute(array($_POST['email'],$_POST['password']))) {$count = $stmt->rowCount();if($count > 0){ header("location: main1.php");}else{ header("location: index.loginfailed.php");}}
  5. <?phprequire_once("php.securelogin/securelogin.php");try{$dbh = new PDO('mysql:host=localhost;dbname=timesheets', $dbuser, $dbpassword);$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);}catch (PDOException $e){exit($e->getMessage());}$stmt = $dbh->prepare("SELECT email,password FROM users where email = ? and password=PASSWORD(?)");if ($stmt->execute(array($_POST['email'],$_POST['password']))) {while ($row = $stmt->fetch()) { print_r($row);}}?> At this point if I enter a valid email and password that is in the users table the row is printed to the browser wi
  6. <map name="map"><!-- #$-:Image map file created by GIMP Image Map plug-in --><!-- #$-:GIMP Image Map plug-in by Maurits Rijk --><!-- #$-:Please do not edit lines starting with "#$" --><!-- #$VERSION:2.3 --><!-- #$AUTHOR:Eric --><area shape="rect" coords="2,2,98,97" onclick="scrollto1()" style="cursor: pointer;" /><area shape="rect" coords="102,3,202,95" onclick="scrollto2()" style="cursor: pointer;" /><area shape="rect" coords="208,3,307,95" onclick="scrollto3()" style="cursor: pointer;"/><area shape="rect" coords="315,5,409,98" on
  7. Thank you for that reply. I have currently found a way to use PHP to solve the problem but I will learn from this as a learning experience.
  8. Although I can console.log lastSel it is coming up as a blank when the PHP is called in the header. So when the header is passed it is id: "" even though clearly there is a value in lastSel and I am type casting to string. I am wondering what could be the source of the issue. lastSel is defined outside of any function braces as just "lastSel = """ without using the var keyword. Why would it be blank as String(lastSel) even though I can console.log a value? <script>$(function(){var date = new Date();var d = date.getDate();var m = date.getMonth();var y = date.getFullYear(); $('#cal
  9. I was able to work through this in time. My problem now seems to be there is a blank row being inserted into MySQL with only an ID but no data for `first`, `last` or email. As far as the calls to session_regenerate_id and session_destroy I was trying to go by the book as much as possible. Perhaps my use of those could use a little bit of work...
  10. <!DOCTYPE html><html><head><meta charset="utf8"><title>Financial Lemonade - Financial Help Guide</title><meta name="description" content="Financial Hardship resources and information to help struggling americans improve their financial status."/><meta name="keywords" content="Financial Hardship Resources, Financial Hardship Guide, Financial Hardship Assistance Aid Help, Hardship, Financial, Grants, Aid"/><meta name="robots" content="ALL"/><meta name="robots" content="NOYDIR"/><meta name="robots" content="NOODP"/><meta name="a
  11. <?phpsession_start(); $p_email=$_SESSION["email_address"];$p_last=$_SESSION["last_name"];$p_first=$_SESSION["first_name"]; $dbh = new PDO('mysql:host=financial-lemonade.com;dbname=finlem', 'root', 'Feeds777');$count = $dbh->exec("set sql_safe_updates=0;"); $res=$dbh->query("select * from users where email=\"$p_email\";");$count = $res->rowCount();if($count == 0){$dbh->exec("insert into users(first,last,email) values(\"$p_first\",\"$p_last\",\"$p_email\");");}session_write_close();session_destroy(); header("location: http://www.financial-lemonade.com/");?> For some reason th
  12. It needed to be more like this: session_start();$email_address = $postFields["email_address"];$_SESSION["email_address"] = $email_address;$_SESSION["last_name"] = $postFields["last_name"];$_SESSION["first_name"] = $postFields["first_name"];session_write_close(); The call to session_write_close() brought the code online.
  13. IIS seems to be fine:OUTPUT:User added...mysql@mysql.commysqlmysql Apache & PHP not so muchOUTPUT:User added... success.php:<?phpsession_start();echo "User added...";echo $_SESSION["email_address"]."<br>";echo $_SESSION["last_name"]."<br>";echo $_SESSION["first_name"]."<br>";?> Why would $_SESSION be output on one server but not on the other. I already tried setting the permissions of the sessions save path to 777 to no avail.... I have to admit I am most confused. The code does run on both servers without any serious breaks but on my rackspace.com cloud I dont ge
  14. Most of the time when I install PHP I get the current directory of the .php file returned from my script. With Zend Server 6 CE DOCUMENT_ROOT seems to be truncating the .php files running directory and is always returning htdocs as the last folder regardless of the fact that my application is actually in /htdocs/samedaycrm/documentroot.php. Is there some way to change the configuration for DOCUMENT_ROOT so that it starts returning the current running directory of the .php file?
  15. <textarea id="event_memo" style="padding: 0px; width: 300px; height: 50px;"><?php echo $event_memo; ?></textarea></br></br> The above works out much better. At first I thought it was the way the PHP is however a text area does not have a value property to set. It does look normal this way. Thanks for your reply.
  16. [color=#4f76ac]<[/color][color=#823125]textarea[/color] [color=#cf4820]id[/color][color=#4f76ac]=[/color][color=#4f76ac]"event_memo"[/color] [color=#cf4820]maxlength[/color][color=#4f76ac]=[/color][color=#4f76ac]"10000"[/color] [color=#cf4820]wrap[/color][color=#4f76ac]=[/color][color=#4f76ac]"hard"[/color] [color=#cf4820]cols[/color][color=#4f76ac]=[/color][color=#4f76ac]"50"[/color] [color=#cf4820]rows[/color][color=#4f76ac]=[/color][color=#4f76ac]"20"[/color] [color=#cf4820]style[/color][color=#4f76ac]=[/color][color=#4f76ac]"[/color][color=#cf4820]text-align[/color]: [color=#4f76ac]left
  17. I have to create some code that will reproduce the error. It should be easy. I'm fairly confident that the problem is fully related to window.location.replace("calendar.php"); So a simple log in script containing that JavaScript redirect and some PHP session code is what I'm building.
  18. var url = "calendar.php"; $(location).attr('href',url); The code above works just fine with the PHP session.
  19. It would be helpful as well to have the database.
  20. I'm attaching by zip file everything I can without compromising the security of my site or it's customers.
  21. If there is a problem in customer-committosession.php which is the call to AJAX I certainly don't see it yet. This is the code for it: <?phpsession_start();$_SESSION['loggedin'] = TRUE; require_once('include.securelogin.php');$mysqli = new mysqli($ad_host, $ad_user, $ad_password, "samedaycrm"); if ($mysqli->connect_errno) { printf("Connect failed: %s\n", $mysqli->connect_error); exit();} $firstname = $_POST['firstname'];$lastname = $_POST['lastname'];$address1 = $_POST['address1'];$address2 = $_POST['address2'];$city = $_POST['city'];$state = $_POST['state'];$zip = $_POST['zi
  22. If I look at the flow of execution of the program I see that when the button is pressed to go to calander.php from main.php there is that .ajax is called from main.php executing customer.comitt-to-session.php and then once execution of customer.comitt-to-session.php completes main.php then does a window.location.replace("calendar.php"); from main.php. After that flow completes I hit the back button and I end up at index.php. This is the top of main.php <?phpsession_start(); if($_SESSION['loggedin'] != TRUE){ header("Location: index.php");} ?> This is the top of calander.php <
  23. Yes that is exactly what I am saying. You are aware of this type of thing happening already?
  24. When I use the back button of my browser it appears that my $_SESSION['loggedin'] = TRUE is passed over as though it does not exist. Would the correct work around be to just place my own back button onto the page? If there is a way for the back button to work without this problem I would really like that but I don't know how to make that happen yet. Thank you for your reply!
  25. I'm noticing that the code which I have at the top of each page: <?phpsession_start(); if($_SESSION['loggedin'] != TRUE){ header("Location: index.php");} ?> is working very well until I attempt to use the back button of Google Chrome. At that point I am sent to index.php. I've been reading into this issue and I see a lot of code that looks like it may be old or possibly deprecated. Is there some way to make this code work with the back button? Comments or suggestions?Many Thanks!
  • Create New...