Jump to content

taquitosensei

Members
  • Posts

    676
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by taquitosensei

  1. According to your query it should be stockfig not model COUNT(model) AS stockfig
  2. What data type is your active column and is it storing 'y' and 'n' or is it 1 and 0? Plus I've never used && before. Not sure that works. I've always used "and".
  3. you might try append "a" instead of "w" so you're not writing to the beginning of the file every time. Not sure if its going through section more than once. The end of the function appears to be missing here.
  4. The string looks okay as serialized data. More likely than not you have a value that's not the same length as the s: part. I would double check your test data to make sure these match.
  5. This is an example and you'll have to make it work with your code but something like this would work. $items=array(1,2,3,4,5,6,7,; $html="<table>"; $c=0; foreach($items as $item) { if($c==0) { $html.="<tr>"; } if($c%3==0) { $html.="</tr>"; $c=0; } $html.="<td>".$item."</td>"; $c++; } $html.="</table>"; echo $html;
  6. I would create an ODBC connection to the database. Then use pdo_odbc. Judging from your phpinfo you'll need to turn on pdo_odbc. It should be in the core php on windows. By adding extension=php_pdo.dll and extension=php_pdo_odbc.dll to php.ini then take a look at http://www.sitepoint.com/using-an-access-database-with-php/ EDIT - I just saw the part about asp 3.0 and this might not 100% apply to you.
  7. exactly like that which is why you did the 60*60*24 to get hours. 60 seconds,60 minutes,24 hours
  8. time is the number of seconds since January 1 1970 so just compare it. if(($timestamp2-$timestamp1) < 5) { echo "Less than 5 seconds"; } else { echo "More than 5 seconds"; }
  9. you need an exit; after the header redirection.Without more info I think that will take care of it. Also...use code tags. It will make it much easier for people to read. if(mail($email,$subject,$messag2,$from)){ header("Location: ../thank-you.html"); exit; }
  10. make sure any includes aren't full path not relative and try using /usr/bin/php -f /home/username/public_html/scripts/master.php
  11. It won't exist the first time you go to the page. As soon as you submit your form it will. So you'll need to check that your for has been submitted before trying to process $_POST['pass']. Something like if(isset($_POST['yourfieldname'])) { // do your processing here }
  12. if you are assembling the javascript on the server this should probably look more like...
  13. It means you're either not initializing your $DBH or it's not actually an object.
  14. you could use session_set_save_handler to override session handling then run code when the session is destroyed.
  15. Usually that means it's not an array. Try print_r($custexp2); to make sure it contains what you expect it to.
  16. you need to use == otherwise you're changing the value to TRUE if($showlog ==True) even better use if($showlogo) That checks for true/false
  17. I know it's text that's why I told you that.
  18. you have to surround it in quotes if it's text $sql .= "WHERE menu_name='" . $_GET['page']."'";
  19. With the way you have your query if the number of columns is different than the number of columns you're trying to insert it will fail. I usually specify my column names. insert into table(column1,column2,column3) values('value1','value2','value3')
  20. where does $logOptions_id come from and is it an array? Because if $friendArray is an array you probably don't want to compare it to $logOptions_id.
  21. Not the php just the html ouput that the php generated.
  22. Try this. You need to check if color is set and if it matches the color of the row you're on in the loop. (isset($_REQUEST['color']) && $_REQUEST['color']==$row['color']) ? 'checked="checked"' : ''
  23. do print_r($_POST); to verify that your $tuturl is correct.
  24. How are you generating your form? You can always create an array of the names. Then loop through and check for them. $radio_array=array("radio1","radio2","etc"); $selected=False; foreach($radio_array as $radio) { if(isset($_REQUEST[$radio] && $_REQUEST['radio'])) { $selected=True; } } if($selected) { // do whatever you need to do here. }
  25. for some reason instead of parsing the php it's convert the < to %3C Need to see what's at the top of the page.
×
×
  • 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.