Jump to content

taquitosensei

Members
  • Posts

    676
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by taquitosensei

  1. 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
  2. you have to surround it in quotes if it's text $sql .= "WHERE menu_name='" . $_GET['page']."'";
  3. 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')
  4. 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.
  5. Not the php just the html ouput that the php generated.
  6. 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"' : ''
  7. do print_r($_POST); to verify that your $tuturl is correct.
  8. 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. }
  9. 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.
  10. You could try this $resulta=($result<1)?0:$result;
  11. What happens if you run your ffmpeg command on the command line? That would be the first thing to check. If that works then it's probably an issue with permissions for php creating the file.
  12. Then you need to explode it before you do this. foreach ($var_hook as $id) { $series[$id] = array(); } It's a string because you imploded it before your sql.
  13. or "SELECT * FROM data WHERE data_id IN (".implode(",", $var_hook).") ORDER BY time_id ASC"
  14. This will substract two dates and give you the difference in hours/minutes. Like DaveyK said if you add 7 days to a timestamp then subtract the original timestamp from it. You will always get exactly 7 days. $diff = strtotime($timestamp2) - strtotime($timestamp1); $hours = floor($diff / 3600); $diff %= 3600; $minutes = floor($diff / 60);
  15. You can do print_r($_REQUEST); at the top of phpdoc.php to see what kind of values are actually being posted. If you do that you should be able to see right away why this isn't working.
  16. It looks like you're not selecting the size. SELECT Food,Calories FROM food order by Food
  17. How permanent do you want it? If it's permanent permanent I would store it in a database somewhere. If it's just somewhat permanent, since you're already using jQuery, use jQuery.ajax to post to server and store a session variable. Then use that session variable to determine whether it's dead or not when initially loading the page.
  18. It does effect the query. Because in first query the value you're getting is '' The second query you're getting a number.
  19. As far as I know UNION removes duplicate rows, so the count(distinct contactid) in the second part would make it not a distinct row. So in your query you're getting everything, then everything with activity in the last week.
  20. Did you install the php drivers? http://www.microsoft.com/en-us/download/details.aspx?id=20098
  21. Also to make this cleaner you could do something like this $fields=array("objava","vpr01","vpr03","etc"); foreach($fields as $field) { if(isset($_POST[$field])) { fwrite($fh, $_POST[$field]."\r\n"); } }
  22. you're outputting a blank line before the session start which starts the headers so then your session start can't start.
  23. pear is a set of php files. If your web server can parse php files then you can use pear. It's just not in the default location for the operating system. Just upload the "pear" folder from your local machine to the web server. Then set the include path. Then call the files as normal.
×
×
  • 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.