Jump to content

Yesideez

Members
  • Posts

    2,334
  • Joined

  • Last visited

    Never

Everything posted by Yesideez

  1. Do you get any error messages? TIP: When posting code if you surround it all with [code] and [/code] tags it preserves formatting and color codes everything for ease of reading.
  2. Any idea how I can get around this? I've got a submit button that isn't being picked up and I've isolated the cause of the problem to be ob_start(). If I comment out that line everything works smoothly. only problem is, I need to buffer all the output!
  3. Does the change in color in your post signify anything?
  4. If you're using PHP, yes it is possible and you're best off using the in-built MSSQL functions: http://uk.php.net/mssql I've tried using Microsoft's DLL libraries to do this myself and found they weren't developed enough. After playing with the above functions I was able to connect to a MSSQL database and access it just like I was accessing a MySQL database. Note that MysQL calls won't work - you'll need to use MSSQL calls. By this I mean LIMIT doesn't work, you need to manipulate the TOP function to emulate this.
  5. If you can explain how/why the dates are being converted to the strange 5 digit number format that would also help. I've not seen that format before.
  6. I think you need mktime() here. http://uk.php.net/mktime Here's a quick function off the top of my head... function makeDT($year,$month=false,$day=false,$hour=false,$minute=false,$second=false) { return mktime(($hour ? $hour : 0),($minute ? $minute : 0),($second ? $second ? 0),($month ? $month : 1),($day ? $day : 1),$year); } That will return a UNIX timestamp depending on what you feed it. Minimum it needs is the year. Whatever is missing in the time gets set to 0. Whatever is missing in the date gets set to 1. Examples: echo makeDT(2009); Will return 1st Jan 2009 midnight echo makeDT(2009,,2,10,30); Will return 2nd Jan 2009, 10:30:00am Hope this is of help and what you're after.
  7. I don't think MySQL likes the # in the field name but not 100% sure on that as I only stick to a-z, A-Z and underscore in my field names.
  8. I can't see $function getting a value AT ALL! This isset() will always equate to false as $function is never being assigned a value let along "add". You need to check where $function comes into this.
  9. Then you need to look at the if() statement before it as it's equating to false and your query is never being called.
  10. OK. Right after that line I just re-formatted insert this line: echo $sqlInsert; Then post the query back if you can't see anything wrong with it.
  11. Set an array at the start of your script containing all the titles. $arrTitles=array('Mr','Miss','Mrs','Dr','Prof','Lect','Principal'); Next we need to place some code where you'd place the select/option HTML for the drop-down box. Title: <select name="title"><?php foreach ($arrTitles as $ttl) { echo '<option value="'.$ttl.'"'.($ttl==$strtitle ? ' selected' : '').'>'.$ttl.'</option>'; }?></select> Note: $strtitle will contain the current selected one.
  12. Welcome Lance! If you post your code between [code] and [/code] tags you can help us as it preserves formatting and color codes everything for us. <?php echo 'This is an example'; ?>
  13. MySQL INSERT has two different ways you can insert data. Method 1: INSERT INTO `table` (`field1`,`field2`,`field3`) VALUES ('val1','val2','val3') Method 2: INSERT INTO `table` SET `field1`='val1',`field2`='val2',`field3`='val3' The second method makes it easier to see what's being assigned to what. Although looking at your code it may be the # in the field name - try this: $sqlInsert = "insert into `statusvalues` (`firstName`,`lastName`,`region`,`ss#`) values ('".$firstName."','".$lastName."','".$region."','".$ssn."')"; I added two spaces and small "ticks" around table and field names.
  14. Or mysql_fetch_assoc() or mysql_fetch_object()
  15. You're using the GD library functions without checking them for values returned. A lot of the function will return a boolean true or false and it doesn't seem like you're checking to see if anything has failed.
  16. If that wasn't their account they won't receive the email and can't reset it.
  17. For a reset password have the user validate themselves by email. If you have a matching email in the database just email out a password reset link. If they click the link inside this email it resets their password AND emails them out what it was reset to. This way no passwords themselves are stored inside the database.
  18. First if you use full <?php insteadof short <? tags it'll be better for you for server compatability and easier for us beause <?php color codes the script. That's just like looking at plain text and nothing stands out. Which line actually links to the avatar image and tries to download it?
  19. I advise against saving PHP files as UTF-8 (with or without BOM) as I had strange padding problems appear where I'd get vertical padding appear at the point of files being included. I changed them to plain ANSI and the padding disappeared. Pulled my hair out over this myself for a good couple weeks until I accidentally discovered it was UTF-8 causing the problem.
  20. I wouldn't rely on this too much as this is set by the browser and can be faked.
  21. It's complaining that services.php cannot be found and cannot be included.
  22. I'm not sure if you can include a class inside the function of a class. Also, you want to start your image resize script to work on $_FILES['file']['tmp_name'] as this is where the file is stored on the server unless you've already moved it elsewhere. If you have moved it elsewhere, you can happily perform any resize operations on the "tmp_name" location of the file then use imagejpeg() or whatever picture format you're using to save the new image out.
  23. If coded properly you can write a small script to make your titles using TTF files by using the GD library.
  24. I don't know what state I'm catching this in now but I'm looking at a large chunk of paragraphs of text sat at the bottom of the page when they look like they should be placed in the large section to the right of the menu. So many tables there but if this isn't how it should look - well, I'd use DIVs.
×
×
  • 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.