Jump to content

astralaaron

Members
  • Posts

    1,254
  • Joined

  • Last visited

Everything posted by astralaaron

  1. anyone know of any webhosts that support PHP 5.2.1 ?? I only found a2hosting.com and networdredux.comI am not sure if these guys are any good.. anyone heard of them?
  2. Anyone know where I can get webhosting that supports php5.2.1 ??please let me know!
  3. okay I tried doing this.. because I could not figure out how to get a page variableon the main forum page where it lists topics i did this:$pg = 1;then where you click on the topic I wrote this<a href="mmabjj_viewtopic.php?id=<?php echo $rows['id'];?>page=<?php echo $pg; ?>">looks like this:http://localhost/vikingbjj/mmabjj_viewtopic.php?id=11page=1and it made it so there was SQL errorsso i tried doing this: <a href="mmabjj_viewtopic.php?id=<?php echo $rows['id'];?>?page=<?php echo $pg; ?>">it lookslike thishttp://localhost/vikingbjj/mmabjj_viewtopic.php?id=11?page=1both of them made SQL errors and would not let me view the topic.. I have no clue how to make the page variable as you can see! please help!thanks
  4. Okay this is what my url looks like when I am viewing a topic in my forum:http://localhost/vikingbjj/mmabjj_viewtopic.php?id=11 what do I do to make a page variable to GET?where do I set the default to 1? is it something else I need to do while making the database ?
  5. Justsomeguy thanks man this is good stuff.Just wondering, where can they enter the SQL to manipulate my database?? in my textfield? or in the address bar?I dont know about the intval I am going to see if php.net will explain how to use that to me.--------------------Okay I went to php.net/intval but it is a little bit confusing to me,do I clean it up during the $id=$_GET[id];or during the SQL $sql4="INSERT INTO $tbl_name(view) VALUES('$view') WHERE id=$id";?? if so how would I even write that?
  6. thanks for this information
  7. okay I need a free one :-)
  8. If they register, and loose their password, and the password is md5() encrypted how would I find it out for them?
  9. thanks, I will try it out a little later!
  10. thanks guys, I am on winXP actually.. I know there is some free ones out there I just cannot remember their name!
  11. What program can I use to record my own video tutorials?I want to record my screen
  12. Can you add CSS styles to input text / textareas? if so how!thanks!
  13. Okay I got it comparing to make sure they typed the same password and email twice..my question is how do I check if my database already has that email address / username they put in?thanks
  14. Okay here is my "viewtopic" page.. how would I add that into this page to make it post a certain number of posts on each page and then start on the next page???if someone can help me with this then my forum will be complete! and I would be very greatfull!thanks! <?php// Start sessionsession_start();// Check if the user already is logged inif ((!isset( $_SESSION['loggedin'] )) || (!$_SESSION['loggedin'])) { header( 'Location: main_login.php' ); exit();}?><?php$host="localhost";$username="root"; $password="******";$db_name="multiforum";$tbl_name="forum1_question"; // Connect to server and select databse.mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB");// get value of id that sent from address bar $id=$_GET['id'];$sql="SELECT * FROM $tbl_name WHERE id='$id'";$result=mysql_query($sql);$rows=mysql_fetch_array($result);?><center><a href="main_forum1.php"><strong>Main Forum</strong></a></center><table width="90%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC"><tr><td><table width="100%" border="0" cellpadding="3" cellspacing="1" bordercolor="1" bgcolor="#FFFFFF"><tr><td bgcolor="#F8F7F1"><strong><?php echo $rows['topic']; ?></strong></td></tr><tr><td bgcolor="#F8F7F1"><?php echo wordwrap($rows['detail'], 26, "\n", true); ?></td></tr><tr><td bgcolor="#F8F7F1"><strong>By :</strong> <?php echo $rows['name']; ?> <strong>Email : </strong><?php echo $rows['email'];?></td></tr><tr><td bgcolor="#F8F7F1"><strong>Date/time : </strong><?php echo $rows['datetime']; ?></td></tr></table></td></tr></table><BR><?php$tbl_name2="forum1_answer"; // Switch to table "forum_answer" $sql2="SELECT * FROM $tbl_name2 WHERE question_id='$id'";$result2=mysql_query($sql2);while($rows=mysql_fetch_array($result2)){?><table width="90%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC"><tr><td><table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF"><tr><td bgcolor="#F8F7F1"><strong>ID</strong></td><td bgcolor="#F8F7F1">:</td><td bgcolor="#F8F7F1"><?php echo $rows['a_id']; ?></td></tr><tr><td width="18%" bgcolor="#F8F7F1"><strong>Name</strong></td><td width="5%" bgcolor="#F8F7F1">:</td><td width="90%" bgcolor="#F8F7F1"><?php echo $rows['a_name']; ?></td></tr><tr><td bgcolor="#F8F7F1"><strong>Email</strong></td><td bgcolor="#F8F7F1">:</td><td bgcolor="#F8F7F1"><?php echo $rows['a_email']; ?></td></tr><tr><td bgcolor="#F8F7F1"><strong>Answer</strong></td><td bgcolor="#F8F7F1">:</td><td width="90%" bgcolor="#F8F7F1" width="50%"><?php echo $rows['a_answer']; ?></td></tr><tr><td bgcolor="#F8F7F1"><strong>Date/Time</strong></td><td bgcolor="#F8F7F1">:</td><td width="90%" bgcolor="#F8F7F1"><?php echo $rows['a_datetime']; ?></td></tr></table></td></tr></table><br><?php}$sql3="SELECT view FROM $tbl_name WHERE id='$id'";$result3=mysql_query($sql3);$rows=mysql_fetch_array($result3);$view=$rows['view'];// if have no counter value set counter = 1if(empty($view)){$view=1;$sql4="INSERT INTO $tbl_name(view) VALUES('$view') WHERE id='$id'";$result4=mysql_query($sql4);}// count more value$addview=$view+1;$sql5="update $tbl_name set view='$addview' WHERE id='$id'";$result5=mysql_query($sql5);mysql_close();?><BR><table width="90%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC"><tr><form name="form1" method="post" action="add_answer1.php"><td><table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF"><tr><td width="18%"><strong>Name</strong></td><td width="3%">:</td><td width="79%"><?php echo ($_SESSION['user']); ?><input name="a_name" type="text" id="a_name" size="45" value="<?php echo ($_SESSION['user']); ?>" style="visibility=hidden;" /></td></tr><tr><td><strong>Email</strong></td><td>:</td><td><?php echo ($_SESSION['email']); ?><input name="a_email" type="text" id="a_email" size="45" value="<?php echo ($_SESSION['email']); ?>" style="visibility : hidden;" /></td></tr><tr><td valign="top"><strong>Answer</strong></td><td valign="top">:</td><td><textarea wrap="hard" name="a_answer" cols="100" rows="10" id="a_answer"></textarea></td></tr><tr><td> </td><td><input name="id" type="hidden" value="<?php echo $id; ?>"></td><td><input type="submit" name="Submit" value="Submit"> <input type="reset" name="Submit2" value="Reset"></td></tr></table></td></form></tr></table>
  15. this wasnt confusing, I understand.--But I could not get the mysql_real_escape_string to work the way you wrote it.. was there a typo?
  16. now this sounds like the way to go.I am not exactly sure how to put this onto my page but It gives me a better understanding! thank you.
  17. thanks you guys.btw justsomeguy I am super-basic at this stuff! I actually did know about the comparrisons I have just never done it with the superglobals.. and was very tired at the time I posted that. figured why not ask to see how you guys would write it?
  18. I want to have the user enter the email twice and password twice to make sure they typed it in correctly.how can I compare the fields before sending it to my php file that sends the information to my database?
  19. sounds like what I need to do, I do not know how to do that though !
  20. something like that, its a message forum like this one.. just not as fancy..when like 10 or 15 posts fill up the first page I want it to start posting on the next..like you had the numbers on the bottom (previous 1, 2, 3, etc.. next)
  21. hey I did not know about the wordwrap() function that works too 8)
×
×
  • Create New...