Jump to content

taquitosensei

Members
  • Posts

    676
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by taquitosensei

  1. you could declare strange at the begining of your php page then return a value. Then just call it in your loop. // this is the beginning of your page function strange($text) { // do something return $something; } then in your loop foreach($value as $each) { if($each==$verify) { $something=strange($text); } }
  2. your last brace in the statement should be a parenthesis. $query = "INSERT INTO subjects ( menu_name, position, visible ) VALUES ( '{$menu_name}', {$position}, {$visible} )"; and you might need quotes around position or visible if the'yre not integers
  3. should be <span class="style9"><?php echo $rows['reason']; ?></span>
  4. see http://www.php.net/date F j, Y, g:i = November 2, 2009, 3:30 Which isn't the best way to do it because then strtotime time can't work with it very well because you don't know am/pm. Your field in your database should be datetime. Y-m-d H:i:s = 2009-11-02 15:30:00 then you could use date and strtotime to format it in php or format it in mysql php $formatted_date=date("H:i d/m/Y", strtotime($timestampe)); mysql select date_format(date_field,'%H:%i %d/%m/%Y') as formatted_date from table
  5. this is your mysql loop { $categories[$row['categoryid']][]=array("subcategoryname"=>$row['sub_name'],"categoryid"=>$row['categoryid']); } then foreach($categories as $categoryname=>$category) { $categoryid=$category['categoryid']; $subcategory=$category['categoryname']; }
  6. this is your mysql loop { $categories[$row['categoryname']][]=$row['cubcaegoryname']; }
  7. select * from table1 where featured='y' UNION select * from table2 where featured='y' UNION select * from table3 where featured='y' etc.. etc..
  8. set your sql to a variable and then echo it to make sure it looks like it should. $VarCount=mysql_real_escape_string($_POST['limit']); $sql="SELECT * FROM test WHERE id NOT IN (SELECT id FROM test1) AND LIMIT $VarCount ORDER BY datetime DESC " echo $sql; $query=mysql_query($sql);
  9. foreach($_POST['product'] as $product) { // do whatever with each product selected }
  10. this should do it if($timestamp < date("Y-m-d H:i:s",strtotime("-7 Days"))); { }
  11. close it's double equals and you need opening and closing braces and instead of closing the php you just need to concatenate and your quotes needed to be redon. <tr> <td width="150" height="18" bgcolor="#000066" class="menu_header2"><div align="center"><span class="style1"><strong>.::</strong>Rank<strong>::.</strong></span></div></td> </tr> <? if ($userlevel==1) { echo "<td bgcolor='#333333'><div align='center'>".$rows['rank']."</td><br>"; } if ($userlevel >=2) { echo "<td bgcolor='#333333'><div align='center'>".$rows['rank2']."<td><br>"; } ?> <br> <br> </div></td> </tr>
  12. the resulting page is HTML well it could be html and javascript. PHP processes on the server and then spits out the HTML that the browser then displays. Two separate things. Server side and client side. Server side - PHP Client Side - HTML / Javascript
  13. change the field data type to mediumtext alter table `yourtable` change column `yourcolumn` `yourcolumn` mediumtext;
  14. $timestamp=strtotime("2009-10-29TO6L54:56.000Z");
  15. in your php you could do as long your day field is a datetime if(strtotime($row['day']) >= strtotime(date("Y-m-d H:i:s"))) { // html for upcoming performances } else { // html for previous }
  16. you forgot a single quote after the last entry in the array.
  17. you could upload a php.ini to your web root with this as the contents upload_max_filesize = 50M that should override only that setting from the regular php.ini
  18. Is there supposed to be another folder before plugins? I see a double slash looks like you're missing a folder.
  19. modify thanks.html to whatever you want that matches. That's the right syntax not sure why it wouldn't be working. header("Location: yourthankyoupage.html");
  20. because it's a string. Either save it as a .php file then include it or use eval but both are evil. They leave open huge security holes.
  21. if you have access to the command line php -l phpfile.php
  22. I gave you the wrong link. Here's the right one. http://webtools.live2support.com/nt_cport.php
  23. go here http://www.canyouseeme.org/ and see if port 465 is blocked. If it's not blocked it might be because you're trying to use SSL
  24. It's in your hosting control panel under content. http://help.godaddy.com/article/3547
  25. using cron. Are you using a hosted server or is this your machine? What operating system are you using? ignore the bit about drupal and this has a pretty good explanation of what cron is. http://drupal.org/cron
×
×
  • 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.