Jump to content

Gayner

Members
  • Posts

    549
  • Joined

  • Last visited

    Never

Everything posted by Gayner

  1. The problem is it's not doing 3column's each row.. $max_cols = 3; $col_num = 0; $this->output .= '<table width=100%></tr><tr valign=top>'; // THERE IS NO OPENING TABLE TAG, SO ADDING THIS SHOULD FIX THAT while( $r = $DB->fetch_row() ) { $col_num++; $this->output .= $this->do_html_row($sess) if ($col_num == $max_cols) { $this->output .= '25</tr><tr>'; $col_num = 0; } $this->output .= '</table>'; // THERE IS NO CLOSING TAG, ADDING THIS SHOULD FIX THAT. } AND $this->output .= $this->do_html_row($sess) is a function called "do_html_row" and it spits out return $this->html->show_row($sess); which my HTML FOR Show_row is: <td><fieldset><legend>{$session['member_name']}</div></a></span></legend> <table class="ftbt"> <tr><th>Last Click: {$session['running_time']}</th></tr> <tr><td class="desc bc1"> {$session['cun1']} {$session['jesus2']} {$session['jesus3']} {$session['msg_icon']} {$session['jesuscash']} {$session['jesus1']} <img src="images!!/p.gif" width="140" height="0"> </td> </tr></table><div class="foot desc">{$session['where_line']}</div>
  2. I Did.. <input type="submit" name="remove" value="Remove Avatar">
  3. Haha I fixed it.. You guys are all wrong? lol it's working just fine for me. if ( $_POST['remove'] ) { $DB->query("UPDATE ibf_members SET monkavatar='' WHERE id='{$ibforums->member['id']}'"); $print->redirect_screen( 'Thanks avatar is Removed!', "act=UserCP&CODE=Avatar" ); }
  4. Why javascript should put here what will it do? this is php lol
  5. Sorry for Double post, but I have a problem, im trying to do this but it just keep's refreshing: if ( $_POST['remove'] ) { mysql_query("UPDATE ibf_members SET avatar='". mysql_real_escape_string(' ') ."' WHERE id={$ibforums->member['id']}"); header("Location: index.php?act=UserCP&CODE=Avatar"); } if(isset($_POST['avatar'])){ $ext = explode ( "|", 'gif|jpeg|jpg|png' ); $checked = 0; $av_ext = preg_replace( "/^.*\.(\S+)$/", "\\1", $_POST['avatar'] ); foreach ($ext as $v ) { if (strtolower($v) == strtolower($av_ext)) { $checked = 1; } } if ($checked != 1) { $std->Error( array( 'LEVEL' => 1, 'MSG' => 'avatar_invalid_ext' ) ); } mysql_query("UPDATE ibf_members SET avatar='". mysql_real_escape_string($_POST['avatar']) ."' WHERE id={$ibforums->member['id']}"); header("Location: index.php?act=UserCP&CODE=Avatar"); } MY HTML IS: <form name="form" method="post"> <input type="text" size=50 name="avatar" value="{$ibforums->member['monkavatar']}"> <input type="Submit" value="Update Avatar"> | <input type="submit" name="remove" value="Remove Avatar"> Now whenever I click on Remove Avatar it just refreshes my page, the name for The Remove avatar submit is "remove" it should follow my $_POST['remove'] right? it's not
  6. Sweet, omg awesome, I love mysql now , thanks a bunch sir.
  7. I am totally lost, on what u said xD:d
  8. if(isset($_POST['avatar'])){ mysql_query("UPDATE ibf_members SET avatar='25' WHERE id={$ibforums->member['id']}"); header("Location: index.php?act=UserCP&CODE=Avatar"); } I have this as my HTML: Avatat url * <input type="text" name="avatar" value=""> <input type="Submit" value="Update Avatar"> How can I update another field name using only 1 mysql_query function too? thx
  9. This code: $styles = array(); $d = dir('css'); while (($entry = $d->read()) !== false) { if (substr($entry, strlen($entry)-4) == '.css') $styles[] = substr($entry, 0, strlen($entry)-4); } $d->close(); // Only display the style selection box if there's more than one style available if (count($styles) == 1) echo "\t\t\t".'<div><input type="hidden" name="skinstyle" value="'.$styles[0].'" /></div>'."\n"; else if (count($styles) > 1) { natsort($styles); ?> <form action="index.php?auth_key=<?php echo $Profile['key']; ?>" method="post" name='theForm' onsubmit='return ValidateProfile()'> Select your Forum Style: <select name="skinstyle"> <?php while (list(, $temp) = @each($styles)) { if ($user['skinstyle'] == $temp) echo "\t\t\t\t\t\t\t\t".'<option value="'.$temp.'" selected="selected">'.str_replace('_', ' ', $temp).'</option>'."\n"; else echo "\t\t\t\t\t\t\t\t".'<option value="'.$temp.'">'.str_replace('_', ' ', $temp).'</option>'."\n"; } ?> </select> <?php } Or: using this as PHP: ($Profile['skinstyle']=='0')? $i = "selected":""; ($Profile['skinstyle']=='1')? $i1 = "selected":"";($Profile['skinstyle']=='2')? $i2 = "selected":""; ($Profile['skinstyle']=='3')? $i3 = "selected":"";($Profile['skinstyle']=='4')? $i4 = "selected":"";($Profile['skinstyle']=='5')? $i5 = "selected":"";($Profile['skinstyle']=='6')? $i6 = "selected":""; ($Profile['skinstyle']=='7')? $i7 = "selected":""; AND HTML FOR THAT: <select name="skinstyle"> <option value="0" $i>24-7GT Default</option> <option value="1" $i1>Light Blue</option> <option value="2" $i2>Sunset</option> <option value="3" $i3>Beautiful Blue</option> <option value="4" $i4>Tan</option> <option value="5" $i5>Crazy Gray</option> <option value="6" $i6>Toxin</option> </select> Which one is better? I created both btw.. but I created the second code first.. I recently made the top code so now I dont know which is better.. thanks
  10. HAHA Thank's adam that worked perfectly! Topic solved. WOW.. PHP Is so cool
  11. $receiver_name = '<a href=?showuser='.$row['sender_id'].'>' . $row['receiver_name'] . $row['to_desktop'] . '</a>'; But it works fine but look at my view source, lol it wont connect.. <td align="left"><a href=?showuser= 124>Gayner92</a></a></td> There is a space.. and it's weird.. I get my $row['sender_id'] name from ibf_logs.. it's a varchar 250 not null.. What is the problem ?
  12. Hi everyone, thanks in advance, lol: This is my DB Query: $DB->query("SELECT * FROM ibf_logs WHERE receiver_id = '{$ibforums->member["id"]}' && month = '$month' && year = '$year' or sender_id = {$ibforums->member["id"]} && month = '$month' && year = '$year' order by date_time DESC"); But I Want it to only do $DB->query("SELECT * FROM ibf_logs"); If a user clicks on a something like index.php?&SHOWALL $_GEt function possible? Thanks!
  13. if (isset($_SERVER['HTTP_USER_AGENT']) && (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false)) $nigger = "im using IE"; else $nigger = "Im using Good browser! Good boy!"; will this work fine ? im using this 1..
  14. I tryed.. And searched the internet and came up with no results.. So like I need a php if function that if a USER IS USING IE, eCHO "BLA BLA" ELSE ECHO "bla bla"; thank u!
  15. Seemed like when I changed null to no instead of Default yes it worked, thank u sir ! Topic Resolved! <3
  16. view_img tinyint(1) Null is Yes and Default it set to 1. And yes if they uncheck it :
  17. Hi Thank you for your response. For some reason that makes my field say "NULL" In the database Any ideas sir? Thanks in advance!
  18. I have this: <input type="checkbox" name="VIEW_IMG" value="1"> But if They uncheck it, then save profile it will make the value="0". Possible? Thank you, I dont want to use javascript formoBJ.value= bla bla. I need to know how to do this with PHP Hope you can help me.. Thank u!
  19. So these ! only works with 1 and 0 ? lol but this is a very easy way to do if else statements if they want value 1 or 0 right ? lol
  20. What if I put a !2 what would that do?
  21. This is my simple code. FIrst of all Hi everyone I am a little lost of some php if function here: if (!$ibforums->member['view_img']) { echo "OH HELLO!"; } So My Variable $ibforums->member['view_img'] in my database means = 1 So If I replace $ibforums->member['view_img'] to 1 it would be: if (!1) { echo "HELLO!"; } I dont get it? What is the ! for ? Thanks in advance. so if it's !0 it means dont show?
×
×
  • 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.