Jump to content

grazzman

Members
  • Posts

    27
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

grazzman's Achievements

Member

Member (2/5)

0

Reputation

  1. yea, the nl2br($user['MyBio']) did the trick... Thanks again, I LOVE THIS FORUM.
  2. Yep, MyBio  text  latin1_swedish_ci  NULL and the echo is just echo $user['MyBio'], form is just a textarea form field
  3. So, This should be a simple one. I have a TextArea on a form. When you submit, it goes to a text field in the Mysql. When I echo the data, it looses all its formating... As in, if I have multiple lines it will echo it as one big line unless I put html code in to the textarea. Is their a way to fix this? Thanks
  4. Ok, here is the full line <td align="center" valign="top"><font size='-2'><?php echo $line['RankTitle'] ; ?></font></td> No matter what I set the size= it will not change the size, it stays at 12, the page default.
  5. Ok, I'm still a noob at the hole php stuff i guess. Im doing a normal echo $line['blabla'] ... That part works fine... but It will not take on any font properties other then the page default settings... So, the page font size is 12, all my echo lines are 12... even with <font size='10px'> around it... Can anyone let me in on what im doing wrong or missing.
  6. Is their a way to do this? SELECT * FROM `User` WHERE RankType = 'Active' OR 'Retired' So that it will show any that have either Active or Retired and none of the others?
  7. So, below is the script I'm trying to use to import a CSV data. the clsuser.php contains my mysql connection information an is working on all my other pages, so im sure its not in their. When I run the script the "mysql_query($sql, $mysql_conn);" in the middle is not working. It keeps showing the error message that I put in their and none of the information is added to the database. If anyone can help and can see what little thing is causing this, it would be a big help. Thanks [code] <?php require_once "clsuser.php"; $a=new Auth($mysql_conn); $csvfile="pm.csv"; $csv=file($csvfile); foreach($csv as $csvline){ $csvdat=QuoteExplode($csvline); $userinfo=array(); $userinfo['Username']=$csvdat[0]; $userinfo['Password']=$csvdat[2]; $userinfo['Email']=$csvdat[10]; $userinfo['FirstName']=$csvdat[8]; $userinfo['Location']=$csvdat[11]; $userinfo['SignupTime']=date("Y-m-d H:i:s", strtotime($csvdat[4])); $userinfo['LastLogin']=date("Y-m-d H:i:s", strtotime($csvdat[3])); $userinfo['RegistrationIP']=ip2long($csvdat[5]); $userinfo['LastName']=$csvdat[9]; $userinfo['BirthDay']=$csvdat[12]; $userinfo['BirthMonth']=$csvdat[13]; $userinfo['BirthYear']=$csvdat[14]; $userinfo['Gender']=$csvdat[15]; $userinfo['Xfire']=$csvdat[16]; $userinfo['GameName']=$csvdat[18]; $userinfo['Recruiter']=$csvdat[20]; $userinfo['LastClan']=$csvdat[21]; $userinfo['Connection']=$csvdat[23]; $userinfo['PCType']=$csvdat[24]; $userinfo['Status']=$csvdat[34]; $userinfo['ForumsID']=$csvdat[35]; $userinfo['Rank']=$csvdat[31]; $userinfo['RankType']=$csvdat[32]; $userinfo['RegTeam']=$csvdat[27]; $userinfo['RegTitle']=$csvdat[30]; $userinfo['CICTeam']=$csvdat[38]; $userinfo['CICTitle']=$csvdat[39]; $userinfo['MPTeam']=$csvdat[26]; $userinfo['MPTitle']=$csvdat[29]; $userinfo['SFTeam']=$csvdat[40]; $userinfo['SFTitle']=$csvdat[41]; $userinfo['CTeam']=$csvdat[25]; $userinfo['CTitle']=$csvdat[28]; $userinfo['AUTHSKEY']=$a->sKeyGenerate($userinfo['Username']); $dbtime=date(DBdateformat); //var_dump($userinfo); //continue; $sql="INSERT INTO User SET Username='" . $userinfo['Username'] . "', Password='" . $userinfo['Password'] . "', Email='" . $userinfo['Email'] . "', FirstName='" . $userinfo['FirstName'] . "', Location='" . $userinfo['Location'] . "', EmailVerified=1, AUTHSKEY='" . $userinfo['AUTHSKEY'] . "', SignupTime='" . $userinfo['SignupTime'] . "', LastLogin='" . $userinfo['LastLogin'] . "', LastName='" . $userinfo['LastName'] . "', BirthDay='" . $userinfo['BirthDay'] . "', BirthMonth='" . $userinfo['BirthMonth'] . "', BirthYear='" . $userinfo['BirthYear'] . "', Gender='" . $userinfo['Gender'] . "', Xfire='" . $userinfo['XFire'] . "', GameName='" . $userinfo['GameName'] . "', Recruiter='" . $userinfo['Recruiter'] . "', LastClan='" . $userinfo['LastClan'] . "', Connection='" . $userinfo['Connection'] . "', PCType='" . $userinfo['PCType'] . "', Status='" . $userinfo['Status'] . "', ForumsID='" . $userinfo['ForumsID'] . "', Rank='" . $userinfo['Rank'] . "', RankType='" . $userinfo['RankType'] . "', RegTeam='" . $userinfo['RegTeam'] . "', RegTitle='" . $userinfo['RegTitle'] . "', CICTeam='" . $userinfo['CICTeam'] . "', CICTitle='" . $userinfo['CICTitle'] . "', MPTeam='" . $userinfo['MPTeam'] . "', MPTitle='" . $userinfo['MPTitle'] . "', SFTeam='" . $userinfo['SFTeam'] . "', SFTitle='" . $userinfo['SFTitle'] . "', CTeam='" . $userinfo['CTeam'] . "', CTitle='" . $userinfo['CTitle'] . "', RegistrationIP=" . $userinfo['RegistrationIP'] . ";"; $qres=mysql_query($sql, $mysql_conn); if (!$qres) echo 'Error inserting user with username '.$userinfo['Username'].'<br />'; else echo 'Inserted user with username '.$userinfo['Username'].'<br />'; } function QuoteExplode($str){ $c=0; $ret=array(); $str="," . trim($str); while($c<strlen($str)){ $so=strpos($str, ",", $c); if ($so===false){ $ret[]=substr($str, $c); return $ret; } $qo=strpos($str, "\"", $c); if ($so<$qo && $so!==false){ } if ($qo!==false && $qo<$so+2){ // Next it is a quote mark $eqo=strpos($str, "\"", $qo+1); if ($eqo===false){ $ret[]=substr($str, $qo+1); return $ret; } $ret[]=substr($str, $qo+1, $eqo-$qo-1); $c=$eqo+1; } else{ $eso=strpos($str, ",", $so+1); if ($eso===false){ $ret[]=substr($str, $so+1); return $ret; } $ret[]=substr($str, $so+1, $eso-$so-1); $c=$eso; } } return $ret; } ?> [/code]
  8. So just put include "http://www.serverstats.com/monitor.php?mon=" . $server ; Do I need to have that in ( ) or anything like that? Also, Thanks, I figured it would be something small and stupid... allways is.
  9. Ok, I need to get the following to work. 1  <?php 2  $server = $_GET['server']; 3  include "http://www.serverstats.com/monitor.php?mon=" + $server ; 4  ?> I know that line 2 is working and pulling 'server' from the URL but I can not get it to append it to the end of the URL on line 3. It just tries to find the value of $server as a local file and ignored the "http://" address in line 3. If any one can help merge this so it will include the URL + $server I would be forever greatful. Thanks
  10. Hey guys. I'm trying to make a javascript grap a random word our of a text file. Their is one word per line in a test.txt file and the javascript just needs to grab one at random and throw it in to a Variable. If anyone has any ideas, im at a loss... thanks
  11. So, im guessing that I can not call a PHP function with Javascript either without Ajax?
  12. Ok, forget the form part.... Can I just set a php $variable to a HTML Textbox? Then I will just make a button that will call the function that has the code to set the value...... Does that make sense? It does not need to be a form, or a post, just something like    $phpVariable = document.getElementById('textbox').value; I know that is Javascript, but I need to merge the gap from JavaScript and PHP..... and I dont even know were to start to look
  13. This should be an easy on.  I have a from in HTML that is inside a Print statment. What I need is when they click on SUBMIT for it to call a PHP Function and to take the value of 2 text boxes and make them into $something for php... I need to do this without the page refreshing or reloading... Any thoughts?
  14. Yea, just need to do some fun replace arrays... :)
×
×
  • 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.