Jump to content

adyre

Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

adyre's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks.. I thought about that.. .I started to analize site's using mod_rewrite and I found out that every one of this sites has the full adress of the srcs..... Now I made for myself an ideea. I put an $domain="http://localhost/" on the top of the page, and when I will put it on the server I will replace it with the domain that I want.... I use the domain in everything: hrefs, src etc. Thanks for your intervension.
  2. I have to rwrite something like this: index.php?pag=1&page=3 if I make this like this: /1/3/ my default directory for my <img> is /1/3/pictures/ but my img folder is /pictures/ Another problem is for JS src and CSS src.... I was adviced to use <base> but I wan't a rewrite solution, if it is (I'm new in rewriting). I can't use static src-s because my site rewrite condition can turn to /1/2/3/4/5/6 ... I thing you got the ideea. And another thig: Is there a merthod to make something like this: RewriteRule ^notebook$ index.php?act=notebook&id=6 but making something like switch($act) { case('notebook'): $id=1; break; case('laptop'): $id=2; break; } but in the .htacces file, or how do I write a rule that for example I have index.php?act=pc[space]hardware&id=5 to replace with /pc-hardware/, replace space with "-".
  3. have you tried: <? if ($friend[online]) { print "<img src='images/star.gif' length='16' width='16'>"; } ?>
  4. First... How can I make to add an Image over another (example a .png on an image I upload to my site for example...) and after that make a resized copy on the server... al this automaticaly.. I just upload the pic and the final result is 2 images (one small size, one original size) with my "fingerprint" on it. And then, if I chose to, how can I zip the pics, automaticaly... And this are for PHP4 or maby 5 (I'm still not yet decided on my hosting.. :P) Hope I expressed myself corectly and you can understand... Anticipated 10x.
  5. How can I send a mail with an atachment and with HTML... For HTMl I tried Content Type and it doesen't work to send to yahoo... Don't wan't phpmailer... just a simple cod... Anticipated 10x...
  6. I have thisd code: <? if(!empty($_GET['cat'])) { $td = 3; $tr = 10; $total = mysql_result(mysql_query("SELECT COUNT(*) as Num FROM subcat WHERE id_cat='".$_GET['cat']."'"),0) or die (mysql_error()); if($total == 0){ print "Nu exista inregistrari!"; } elseif(!isset($_GET['pag'])){ $pag =1; } else{ $pag = $_GET['pag']; } $sql = mysql_query("SELECT * FROM subcat WHERE id_cat='".$_GET['cat']."' ORDER by nume ASC limit ".(($pag * ($td * $tr)) - ($tr * $td)).",".($tr * $td)." ") or die (mysql_error()); $pag_total = ceil($total/($tr * $td)); if($pag > $pag_total){ print "Nu exista inregistrari!"; } elseif($pag_total > 0) { $settd=0; ?> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr> <? while($row = mysql_fetch_array($sql)){ if($settd == $td) { print "</tr><tr>\n"; $settd=0; } elseif($settd != $td) { $settd++; ?> <td align="center" valign="middle"><?=$row['id']?> - <?=$row['nume']?></td> <? } } } print "</tr></table>"; } ?> Problem: It show from database all without a row. If I remove: <? elseif($settd != $td) { $settd++; ?> <td align="center" valign="middle"><?=$row['id']?> - <?=$row['nume']?></td> <? } ?> it show's all my rows, but ofcourse it doesen't show's me the results on columns. Any other ideea...
  7. It works perfect... Thanks very much... You don't even know how much you helped me... I've tried so much to figure this out and I haven't found a solutin... 10x
  8. I have something like this: <? $sql = mysql_query("SELECT data, DATE_SUB(data, INTERVAL 20 DAY) - CUR_DATE() as DATAX"); while($row = mysql_fetch_array($sql)){ print $row['datax']; } ?> And it displays somethink like 90 days even if 'data' is the current date...... If any of you can help, please do that..... Or any other method so I can display how many days remaining until "data" its 20 days old. I delete them automaticaly if they reach 20 days, but I can't post "X days remaining"... Excuse my English, but I'm from Romania...
×
×
  • 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.