Jump to content

MrAdam

Members
  • Posts

    489
  • Joined

  • Last visited

Posts posted by MrAdam

    Apache

    is this in HTML KIT? perhaps it doesn't support .PHP or something ? Try saving the files/folders into htdocs, then right clicking on them and renaming them that way?

  1. users table:-user_id-user_active-username-user_password-user_session_time-user_session_page-user_lastvisit-user_regdate-user_level-user_posts-user_timezone-user_style-user_lang-user_dateformat-user_new_privmsg-user_unread_privmsg-user_last_privmsg-user_login_tries-user_last_login_try-user_emailtime-user_viewemail-user_attachsig-user_allowhtml-user_allowbbcode-user_allowsmile-user_allowavatar-user_allow_pm-user_allow_viewonline-user_notify-user_notify_pm-user_popup_pm-user_rank-user_avatar-user_avatar_type-user_email-user_icq-user_website-user_from-user_sig-user_sig_bbcode_uid-user_aim-user_yim-user_msnm-user_occ-user_interests-user_actkey-user_newpasswd

    Apache

    I've never used HTML KIT before, but it should save the files (images needed too) somewhere you specify, specify it to save them at: "C:\Program Files\XAMPP\htdocs\".--------And if you mean the PHP system files, they should be saved.. "C:\Program Files\xampp\php".If you mean; where do you save the php scripts you create? just save them in "htdocs" along with HTML files, images, style sheets.... etc etc.

    Apache

    XAMPP is a piece of software which installs and then helps you maintain a server. IT also installs PHP, MySQL, PHPMyAdmin and a few other things.Once you have installed XAMPP, you should then have your own intranet, on your computer. The server has a folder within it's program files, where you would store all your webpages, scripts, style sheets, images etc.Most often this will be the path: "C:\Program Files\xampp\htdocs\" as andersmoen said. Once you saved a file in there, you have to open that file through the server. For example; if you went to "C:\Program Files\xampp\htdocs\" and saved a file called "index.php" .. to view that file you would then go to "http://localhost/index.php".If you went to "C:\Program Files\xampp\htdocs\index.php" in your browser, the php wouldn't be run because php is only installed on the server.To make it clear.. the server, "serves" you the web pages.

  2. face to face and just say how you feel - i did the same not so long ago, she didn't like me back (sadly) .. but she didn't make fun, or make it hard for me .. she just said she's sorry but she doesn't feel the same way - i'll do the same next time i'm in that position.So weird.. discussing how to tell girls you like them, on a web-developers-help forum ?!

  3. depends really what you define as "style" ? is it a complete different look, or is it just colours changed or?if it's just colours, you could just use $style to set the external style sheet...

    <link rel="stylesheet" type="text/css" href="css/<?php print $style; ?>_style.css" />

    so if they select the "red" theme for example, $style will equal red and it will use "css/red_style.css".If it's a compelte different look, it would probably be a bit harder to implement..

    if ($style=="theme1") {print '<img src="images/header_theme1.jpg" />';}

    (that kind of thing throughout index.php)

  4. if you want the user to click it, and it changes instantly, you'll need to use JavaScript - where as if you're okay with the page refreshing to reveal the updated style .. you could create links that pass variables in the url, for example:

    index.php?style=red

    then at the start of index.php, you detect if style has been changed, if so; you update the cookie:

    $style = $_GET['style'];setCookie('style',$style,'time()+60*60*24*30');

    (will expire in 30 days)else, retrieve the current style from the cookie:

    $style = $_COOKIE['style'];

    ... then the rest of index.php can be written using $style to determine what style you are using.

  5. There's quite a few errors really, i'll rewrite it for you:

    $stat_rand1=rand(0/999999);$stat_rand=$stat_rand1/1000000;if($action==$skill) {  echo"You have gained $stat_rand on your skill";  $query = mysql_query("SELECT * FROM playeddeatils WHERE username='$myusername'");  while($rows=mysql_fetch_array($query)) {	$stat=$rows["$skill"]+$stat_rand;	$new_energy=$train_energy-10;	mysql_query("UPDATE Playeddetails SET train_energy= '$new_energy' WHERE username='$myusername'");	mysql_query("UPDATE Playeddetails SET skill= '$stat' WHERE username='$myusername'");  }}

    Errors corrected:the 'if' was wrong for 3 reasons; == should be used for comparison, $skill needed the dollar sign and you needed curly brackets around the code within the if.I assumed that $rows was supposed to loop through each result from the database (with it being plural), so i added the loop; i think i closed it at the right place.Also I assigned the query to a variable ($query) and updated the mysql_fetch_array() statement

  6. mysql_query("SELECT* FROM playeddeatils WHERE username='$myusername');

    should be:

    mysql_query("SELECT* FROM playeddeatils WHERE username='$myusername'");

    .. note the closing double quote.

  7. Mid(decrypt, lngStart, 1) = rp2'decrypt = Replace(decrypt, rp1, rp2, lngStart, 1)

    in Mid() you're saying the string to check through is "decrypt", yet decrypt is set after that statement, and it's "rem'd" out?oh and i think Mid() needs to be on the other side of the equals sign?----------Adam

  8. @andersmoenI don't know a great deal about servers - though I'm learning at college :). But i believe IIS is different to Apache and XAMPP is for apache servers only.

  9. for in case on the last page there is an unfitting number of images (eg. 5) you should create some kind of save (otherwise the table may mess up because the <tr> wasn't closed right and the columns don't match.

    print '<table>';$total = mysql_count_rows($query);$y = 1;$x = 1;while ($rows = mysql_fetch_array($query)) { if ($x == 1 && $y < $total) {  print '<tr>';  print '<td><img src="{$rows['url']}" /></td>';  $x++; } elseif ($x == 1 && $y == $total) {  print '<tr>';  print '<td><img src="{$rows['url']}" colspan="3" /></td>';  print '</tr>';  $x++; } elseif ($x == 2 && $y < $total) {  print '<td><img src="{$rows['url']}" /></td>';  $x++; } elseif ($x == 2 && $y == $total) {  print '<td><img src="{$rows['url']}" colspan="2" /></td>';  print '</tr>';  $x++; } elseif (x==3) {  print '<td><img src="{$rows['url']}" /></td>';  print '</tr>';  $x = 1; }$y++;}print '</table>';

    - I haven't checked it, last time I did it sloppy and forgot $ on the x variable; there still could be errors with it - but it should be fool proof.

×
×
  • Create New...