Jump to content

dumdumsareyum

Members
  • Posts

    97
  • Joined

  • Last visited

    Never

Everything posted by dumdumsareyum

  1. Hi guys I have a question. I am using the php mail function to send an email from a website. This worked just fine prior (like, immediately prior) to having an ssl certificate installed with my hosting company. Now the mail function returns true (based on my code generating a success message if this condition is met), but no email ever arrives in my inbox. Do I have to change how I am sending the mail? It works the same way if i access the page via http or https. Thanks!
  2. Okay, I tried the test page and I'm still kind've having an issue...When I first load the page in my iphone it does not look fitted to a mobile page. A couple of times if I hit the login button and then go back the page appears fitted like a mobile page, but then if I reload the page it is scaled down again. This is so frustrating!
  3. Hello all, I need some major help I am trying to create a mobile site for an existing website. It is used for a company workorder system and not on the WWW or I would post a link to it. When I use the meta tag <meta name = "viewport" content = "width = device-width, initial-scale = 1.0"> it works sort've okay on the iPhone except when switching back and forth between landscape and portrait it doesn't autofit. But I've been told the scaling doesn't work at all on android. So I went back through the mobile style sheet and removed everything that uses px or fixed widths and everything is in percentages or not defined at all, and I removed the meta tag for the iPhone. So then it didn't fit to the device width and scales it down tiny as though it is a large webpage. I tested removing the stylesheet completely for mobile (I am using a get variable for mobile site not device recognition) and the iphone still thinks it is huge site and scales my test webpage down to teeny tiny. I was looking at the dell mobile site as an example http://mobile.usablenet.com/mt/www.dell.com It doesn't look like it use the iphone meta tag or any kind of device recognition and yet it still works beautifully. Everything I've read online says to just not use fixed dimensions or pixels and you'll be fine.....so why, why isn't this working? Please help, I have been staring at this thing for hours. Thanks!
  4. Hi, I'm not sure where this belongs, but i'm working on a site that has html elements positioned over flash. It works fine in all my browsers on my pc, but on the mac when html elements are moused over, the element being moused over stays visible but all the rest of the html on the page disappears. Any suggestions? Preview of the site is at www.empiread.com/leftyco thanks!
  5. Well, i figured out a way to combine the forms without the need for the javascript submit, but in doing so I realized i had a typo for one of my variables in several places, so that was probably the root of the problem. Thanks anyway!
  6. I do have a session start (just didn't show here) and I know that my other session variables I am setting are working when I'm not using javascript to submit a form prior to submitting the form that was clicked on. Thanks for the warning on the array keys though, it hasn't given me an issue so far but good to know. I have several separate forms with submit buttons on the page, but I want one specific form submitted everytime another form on the page is submitted. So also if anyone has suggestions of another way to do this they'd be appreciated to
  7. Not sure whether to post this in PHP or Javascript. I have a form that is being submitted when another form is submitted using javascript. <form action="out_detail.php" method="post" enctype="multipart/form-data" onsubmit="javascript:submitdetail()" > Where submitdetail looks like: function submitdetail() { document.forms.detail_form.submit(); } The problem I'm having is I'm not sure how to capture the information that is submitted from the first form before the second form submits. I tried setting a session variable at the very beginning of page for the value I'm looking for: if($_POST[detail_descrip]) { $_SESSION[add_out][detail_descrip] = $_POST[detail_descrip]; } but the info is not showing up in the session variable, like the page doesn't load or something in between form submissions for the value to be set? Help please.
  8. I have a grid of buttons that I would like to have all the same width (specified button width: 100px for example). However when I specify this width, some of the text gets cut off. I specified overflow: visible, which seemed to do zip. I know i can insert a new line to manually make it wrap, however the text is coming from a database so I won't know exactly how long it will be. I can write a function to insert it with php, but if there's a CSS option I'd much rather use that. Thanks!
  9. I am trying to modify a flash/actionscript template with about 0 knowledge of actionscript. I have identified the problem, but don't know enough to fix it. I will try to explain. There are 4 photo galleries with thumbnails and the paths to the images are identified in an xml file. The problem is that when the user selects a new photo gallery that does not have as many images as the prior gallery they viewed, the thumbnails from the prior gallery are not removed. For example, if they view a gallery with 10 images and then view a gallery with 8 images, the last 2 thumbnail images(which are technically movie clips) from the first gallery remain on the screen. var createThumb = function(num:Number){ var path:MovieClip = gallery.bigIm.thumb; var mask:MovieClip = gallery.bigIm.thumb.mask; var bgr:MovieClip = gallery.bigIm.thumb.bgr; var pathMove:MovieClip = gallery.bigIm.thumb.cont; var thArr:Array = _root.getThPath(num); pathMove._x = 0; _root.numberImages = thArr.length; for (var j:String in path.gall){ path.cont[j].removeMovieClip(); } (function continues....) So, I don't know how the for(var:String in path.gall){ path.cont[j].removeMovieClip();} loop works, it doesn't look like any for loop i'm used to seeing....Let me what other information is necessary to solve my issue.....Thanks!
  10. How do I free the result from a mysqli_multi_query call? I tried using mysqli_free_result, but i'm guessing it's not working because the multi_query only returns a boolean, and I can only find object oriented examples of how to free the multi query and I need a procedural example. Any help? (I am not using any returned data from this call, just inserting some db information and it won't let me make any more database calls until I free the result) Thanks!
  11. I have a page that opens another page. When the "child" page (?) form is submitted it is supposed to refresh the opening page. Also, the form submits back to the same page, some code is executed, and then I was trying to use Javascript to close the page and update the opening page but it's not working and i'm not getting any errors. Here is the code for the child page which has the Javascript in it: <?php require_once("classes/tc_calendar.php"); require_once("lib/in_out.class.php"); $iob = new in_out_board(); ?> <html> <head> <script type="text/javascript"> function verifyDate(){ var currentTime = new Date(); var month = currentTime.getMonth() + 1; var day = currentTime.getDate(); var year = currentTime.getFullYear(); returnDateString = document.out_form.date1.value; var dateArray=returnDateString.split("-"); var form_month = parseInt(dateArray[1]) - 1; var returnDate = new Date(dateArray[0], form_month, dateArray[2], 23, 59, 59); if(returnDate < currentTime) { window.alert("Date selected is cannot be before the current date current date of " + currentTime); return false; } else { return true; } function updateParent() { window.opener.document.location.reload(true); } function closeWindow() { self.close(); } } </script> <script language="javascript" src="calendar.js"></script> </head> <body> <?php if($_POST) { print_r($_POST); if($iob->verify_date()) { if($iob->verify_add_out($_REQUEST[id])) { $iob->add_out(); //close the page ?> <script type="text/javscript"> //<!-- updateParent(); closeWindow(); //--> </script> <?php } else echo "The specified employee is already out! Please check in before changing out status."; } else echo "Invalid Date. <a href=\"javascript:history.go(-1)\">[Go Back]</a>"; } $iob->display_employee_info($_REQUEST[id]); $iob->add_out_form($_REQUEST[id]); ?> </body> </html> Once the form is submitted it checks that the date entered is valid w/ Javascript and if that's ok it checks that the record is ok to be added to the database, and then it adds it with $iob->add_out(). After it's added I would like opening page to be updated and the current page to close. Not sure why it's not working. Thanks
  12. I have two columns "first_name" and "last_name" returned as a single column "name" . I only want the values of that occur in the table "employees" that don't occur in table "out_board". So far I have this to return only the rows from employees that don't occur in out board: SELECT employees.* AS name FROM employees LEFT JOIN out_board ON employees.id=out_board.id WHERE out_board.id IS NULL; and this to combine the columns: SELECT CONCAT_WS(" ", first_name, last_name) AS name FROM employees; but I don't know how to combine the two so I only get the concatenated name column from my join. Thanks!
  13. whoops....clumsy me. I accidentally nested the include in the if statement that checks the Session authorization. No wonder nothing was happening! Thanks for all ur suggestions.
  14. No, it doesn't work without the quotes either unfortunately. The first error it gets to is where I am checking to see if the username exists. when I echo this query I get SELECT * from WHERE username = '' which is very strange to me too because the value that should be in the username is also now not appearing, and it is set from that function ($this->username = $username, and $username is a function parameter), and has nothing to do with the variables I am trying to include in the constructor but for some reason is now not working either.
  15. Here is what the stuff in the file looks like /*DABATASE TABLE*/ $this->accountTable = "clients"; /*path to redirect successful login to*/ $this->login_success_path = "client.php"; /*path to redirect a failed login to*/ $this->login_failed_path = "client.php"; /*path to page to process email verifications, using get input*/ $this->verification_path = "verifyAcct.php"; /*Do email accounts have to be verified before logging in? 0 = accounts do not need to be verified, 1 = accounts do need to be verified*/ $this->using_verified = 1; /*Method of verification -- administrator confirmed = 0, user confirmed = 1 Administrator emails account details to admin and they log in and approve/disprove. User confirmed emails user and has them confirm receipt of email*/ $this->verification_method = 0; which before i moved it just looked like private $accountTable = "clients.php"; and now I declare private $accountTable; in the class also, I tried echoing something, anything, from the constructor, should I be able to do that?
  16. yeah I had $session_file without the quotes first, I was just trying different things because I couldn't figure out why it didn't seem to be including the file
  17. I'm working on a login class. I am trying to send a file with settings to the constructor function, like this: public function __construct($settings_file) { session_start(); $this->connectToMySQL(); //$this->checkUserIP(); if(!isset($_SESSION['auth'])){ $_SESSION['auth'] = 0; if(!include("$settings_file")) throw new Exception("Unable to find settings"); } } The settings file contains the name of the database table etc. in form of $this->dbName = "dbName"; Before I was doing it this way, all my variables were just declared inside the class, but then I thought it would be nice to use the same class for regular accounts and administrator accounts and just include whichever file I wanted to change the db table and other settings for an admin. However, now it is not finding those variable values from the external file, and it doesn't throw the exception I have either shown here in the constructor, my queries are just returning exceptions and when I echo the variables in question they are null.....So, am I going about this wrong or what?
  18. PHP & MySQL for dummies is a good place to start too. It will teach you how to connect to a a MySQL database with PHP and some basic SQL to insert and retrieve your data. You will need to use the mysql_connect() function to connect to the database, and mysql_query() to interact with the database. The online phpManual can give you some basics about the functions. Alternately, if the only reason you are storing this information is for a returning user, you could possibly just set cookies to remember this information. Copying scripts without any knowledge of how they work is like downloading a set of plans for a building and then going on the internet and asking "How do I build this?" We'd love to help, it's just there are books and website tutorials dedicated to this, we can't answer such general questions in a single post.
  19. Is there a way to play music continuously while navigating through different pages, without using AJAX or frames? something like determining where the track is when the user leaves the page and then picking up at that time on the next page?
  20. btw I put the html and the css in the validator and they came out ok, so that's when I decided to defer to the css gods on this forum
  21. I have this section at the bottom of my page that I'm trying to have scroll bar at the bottom and have the content be very wide (but the rest of the page is not) It works like a champ in mozilla and safari, looks shaky in opera, and looks like a$$ in ie here's the link http://www.slantgraphics.com/0901_HoustonControls/home.php and the code associated with the part in question: #slider { height: 135px; margin-left: 11px; margin-right: 12px; overflow: auto; background: #5c1817; clear: both; color: white; } #sliderwrap { width: 1600px; } #slider .group { float: left; margin: 10px; margin-left: 25px; margin-right: 25px; width: 175px; text-align: left; } and the html <div id="slider"> <div id="sliderwrap"> <div class="group"> <table> <tr><td><img src="<?php echo $path."images/industrial_image1.jpg" ?>" alt="Industrial Image" height="95px" /></td> <td>Sample image</td> </tr> </table> </div> <div class="group"> <table> <tr><td><img src="<?php echo $path."images/industrial_image1.jpg" ?>" alt="Industrial Image" height="95px" /></td> <td>Sample image with lots of text oh no</td></tr> </table> </div> //these sample images repeat a few more times </div> </div> Can anyone help please?
  22. thanks but I just realized adding the file extension back does work, I had just forgotten to upload my changes to the server. oops!
  23. I am trying to send an email with an attachment. The attachment file type should be pdf or doc. I check the file submitted in my form for this extension and then email it. It is working good except the file shows up with no extension. I tried appending the file extension I had found earlier to check the file type, but it didn't work. I think my problem may lie in that my attachment type is listed as "application", but I don't know what the appropriate attachment type would be as the part to send the attachment was a copy past job Help please? if($_POST) { //check if a file was uploaded move to uploads if(sizeof($_FILES > 0)) { $file_ext = strrchr($_FILES['resume']['name'], '.'); $file_ext = strtolower($file_ext); if($file_ext == ".pdf" || $file_ext == ".doc" || $file_ext == ".docx") { $tempfile = $_FILES['resume']['tmp_name']; $origin = $_FILES['resume']['name']; $date = date(mdY); $time = date(His); //send email ini_set(sendmail_from, "chriscernoch@slantgraphics.com"); // Additional headers $headers .= 'To: <exampleemail@example>' . "\r\n"; $fileatt = "$tempfile"; // Path to the file $fileatt_type = "application/octet-stream"; // File Type $fileatt_name = "resumeD$dateT$time$file_ext"; // Filename that will be used for the file as the attachment $email_from = "examplememail@example.com"; // Who the email is from $email_subject = "Resume Received"; // The Subject of the email $email_txt = "A resume as been received from the Houston Controls website"; // Message that the email has in it $email_to = "exampleemail@example.com"; // Who the email is too $headers = "From: ".$email_from; $file = fopen($fileatt,'rb'); $data = fread($file,filesize($fileatt)); fclose($file); $semi_rand = md5(time()); $mime_boundary = "==Multipart_Boundary_x{$semi_rand}x"; $headers .= "\nMIME-Version: 1.0\n" . "Content-Type: multipart/mixed;\n" . " boundary=\"{$mime_boundary}\""; $email_message .= "This is a multi-part message in MIME format.\n\n" . "--{$mime_boundary}\n" . "Content-Type:text/html; charset=\"iso-8859-1\"\n" . "Content-Transfer-Encoding: 7bit\n\n" . $email_message . "\n\n"; $data = chunk_split(base64_encode($data)); $email_message .= "--{$mime_boundary}\n" . "Content-Type: {$fileatt_type};\n" . " name=\"{$fileatt_name}\"\n" . //"Content-Disposition: attachment;\n" . //" filename=\"{$fileatt_name}\"\n" . "Content-Transfer-Encoding: base64\n\n" . $data . "\n\n" . "--{$mime_boundary}--\n"; if( @mail($email_to, $email_subject, $email_message, $headers)) { echo "<p class='message'>Your resume has been received. You may also <a href='a href=$path/jobs/application.php'>submit an application</a> at this time if you have not already done so.</p>"; } else { echo "<p class='message'>We were unable to receive your resume at this time. Please try again later or call our office at 713.672.1200.</p>"; } } //end of file file_ext else { $message="type";} } //end of if sizeof(files)
  24. Thanks! I'm definitely going to get a copy of the book mentioned in that post. Regex just goes right over my head right 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.