Jump to content

bleured27

Members
  • Posts

    68
  • Joined

  • Last visited

Everything posted by bleured27

  1. hy there please put your code between code tags, beside that did you test if your host apche is on/supporting
  2. oh well they do that whith an variation of id becose id never is the save you can't get the same picture. (don't you know id?=>learn mysql or an other databese that connects whith php)
  3. you could make random numbers whith pi and time to get pi as exactly as possible use this calculation . <table><tr><?php $c='3';$d=1;$md=1000000; $s=3; $pi =10000000000000; $pi2=10000000000000; while($d<=$md){ if($s==4) { $pi=$pi+($pi2/$c); $s=3; $pi3=$pi*4; $result = mb_substr($pi3, 0, 1); $result2 = mb_substr($pi3, 1, 300); echo"<td>line".$d."</td><td>:</td><td>";echo $result.".".$result2."</td></tr><tr>"; } else{ $pi=$pi-($pi2/$c); $s=4; $pi3=$pi*4; $result = mb_substr($pi3, 0, 1); $result2 = mb_substr($pi3, 1, 300); echo"<td>line".$d."</td><td>:</td><td>";echo $result.".".$result2."</td></tr><tr>"; } $c=$c+2; $d=$d+1; } $pi=$pi*4; echo $pi; ?> </table> (php might not be the best script to do this) and use a calculation whith pi to take a digit (i always use this way to get random numbers.) <?php $result = mb_substr($pi, 1, 3); //this takes the 2,3,4 character of the variable $pi $result = mb_substr($pi, 1, 2); //this takes the 2,3 character of the variable $pi //so mb_substr($pi[difines the variable's characters you take] //mb_substr($pi, 1[difines the characters you skip,change it to a calculation of time for random] //mb_substr($pi, 1, 2[this difines how long your new variable is]); //so $number ="390534"; $result = mb_substr($number, 1, 4);//this makes 9053 //so result="9053"; ?> to find pi better in php(les likly to crash your server/browser) (origanily mad for testing php's calculating skills this didn't work 100% properly becose if you put in a to high number(in the code not in the form) you get the hexidemential (or something like that) numbers) <form action="" method="post"> <input type="text" name="md"> <input type="submit" value="calculate"> </form> <?php if(isset($_POST['md'])){ ?> <table><tr><?php $c='3';$d=1;$md=$_POST['md']; $s=3; $pi =10000000000000; $pi2=10000000000000; while($d<=$md){ if($s==4) { $pi=$pi+($pi2/$c); $s=3; $pi3=$pi*4; $result = mb_substr($pi3, 0, 1); $result2 = mb_substr($pi3, 1, 300); echo"<td>line".$d."</td><td>:</td><td>";echo $result.".".$result2."</td></tr><tr>"; } else{ $pi=$pi-($pi2/$c); $s=4; $pi3=$pi*4; $result = mb_substr($pi3, 0, 1); $result2 = mb_substr($pi3, 1, 300); echo"<td>line".$d."</td><td>:</td><td>";echo $result.".".$result2."</td></tr><tr>"; } $c=$c+2; $d=$d+1; } $pi=$pi*4; $result = mb_substr($pi3, 0, 1); $result2 = mb_substr($pi3, 1, 300); echo"best result =".$result.".".$result2; ?> </table> <?php }else{echo"see how many pi multiplayers your pc can handle<br /> pi=4*(1-1/3[multiplayer1]+1/5[multiplayer2] etcetra)";}?>
  4. <a href="showBadges1.php" class="nyroModal" style="display:none"></a> <a href="showBadges2.php" class="nyroModal" style="display:none"></a> <a href="showBadges3.php" class="nyroModal" style="display:none"></a> <script> $(document).ready(function() { //how can I run associate above links to nyromodal one by one. That is next popup appears only if previous get disappeared. $('a.nyroModal').each(function(){ $(this).nyroModal({ minWidth:500,minHeight:580, modal:true}); $(this).trigger('click'); }); )} </script> you should create a diffrend function for popup and change the class of each picture, becose it all have the same class the script activate all pictures to popup
  5. hy i am looking for a list with all javascript codes and pre defined variables. why? because i understand the basics of javascript how it works and how to applay almost evrything,still i keep forgetting the codes, so i have to find them again. so i would like to have a list so i can learn easy all the codes do you have one? because i really would appriciate if you can give me one btw ) sorry for my worse Englisch just a joung programmer here.
  6. salathe im just 16 years old and programming for 4 years you can't expect me to know evry liddle thing the most people learn while they r studying
  7. ow jhea thank you jazz i didn't knew it was pre determent in mysql when i did that it worked fine it only is still a bid starnge that it gives an OR error and you jessica tnx for being so enoying it helped me not at all why do you even post here when you have nothing to bring in>?? btw do you know the meaning of newb. Lulz
  8. !btw i know what it does i just include this in to my whole code when im finisched!
  9. i was just eating but this is the entire code CTRL + Q to Enable/Disable GoPhoto.it i was just eating and i will ignore your nonsens stilll this is the entire code . for you to post again <?php require('connection.php'); $user=1; $result = mysql_query("SELECT * FROM $table_messages where reciver='$user'", $con); $num_rows = mysql_num_rows($result); if($num_rows ="0" ){echo " no messages";}else{ echo $num_rows." messages";} ?> <?php $con = mysql_connect("localhost","sh","onyou"); mysql_select_db("game", $con); $table="accaunts"; $table_kingdom="members"; $table_messages="messages"; ?> if you can't solve this problem il go read some more books and hey don't be to hard for me im just an starting programmer who isn't even an adult so keep your smartass notices in front of you
  10. how every when i put (mysql_error()); on again the same error comes
  11. hy i found something it is working whith other variables or get away a bit it works when i do $result = mysql_query("SELECT * FROM $table_messages where reciver='$user'", $con); //i rechecked the variables in my db and they are right i don't understand why this cant the error must be in '$user' and read !='1'", $con);or die(mysql_error());
  12. same error whith this <?php require('connection.php'); $user=1; $result = mysql_query("SELECT * FROM $table_messages where reciver='$user' and read !='1'", $con);or die(mysql_error()); $num_rows = mysql_num_rows($result); if($num_rows ="0" ){echo " no messages";}else{ echo $num_rows." messages";} ?>
  13. no that was where i stucked to i dont have anything like OR those are the full documents u see there
  14. well i can look into it while im doing 6 websites @ the moment and i am only here becose i have an error so i will look into it as soon as possible.
  15. yes i have <?php $con = mysql_connect("localhost","*****","*****"); mysql_select_db("game", $con); $table="accaunts"; $table_kingdom="members"; $table_messages="messages"; ?>
  16. in my browser there stands in my browser there stands eddit in the bottom right of my posting. when i eddid my posts i dont know what prefrences you have on your accaunt..... btw that control q was an mis click i didnt noticed it until now
  17. CTRL + Q to Enable/Disable GoPhoto.it besides that you need to do something about the lay out it is not handy for other pprogrammers including yourself to read messy code first of all you can do this <?php if($x!=$y): echo"x is not y";endif; ?> and this <?php if($x!=$y) TAB{ TABTAB echo"x is not y"; TABTAB if($x>$Y) TABTAB { TABTABTAB echo"x is more than y" TABTAB } TABTAB else TABTAB { TABTABTAB echo"y is probebly equal or bigger than x"; TABTAB } TAB} ?>
  18. CTRL + Q to Enable/Disable GoPhoto.it i changed my last post you might want to read that and besides that delete your last reply and click eddit.
  19. please clean up your code it is messy this ("SELECT * FROM booking WHERE LessonDate = '".mysql_real_escape_string($LessonDate)."' AND (StartTime >= '".mysql_real_escape_string($StartTime)."' AND StartTime <= '".mysql_real_escape_string($EndTime)."')"); should be this $LessonDate =mysql_real_escape_string($LessonDate); $StartTime=mysql_real_escape_string($StartTime); $EndTime=mysql_real_escape_string($EndTime); ("SELECT * FROM booking WHERE LessonDate = '$LessonDate' AND (StartTime >= '$StartTime' AND StartTime <= '$EndTime' ")"); *note i didn't looked @ the content yet so i did not took the errors out of it btw plese put it between code taggs so i can read it properly [tag] like this <?php include('../config.php'); $Name = ''; $LessonDate = ''; $StartTime = ''; $EndTime = ''; if (isset($_POST['submit'])) { if(isset($_POST['Name'])){ $Name = $_POST['Name']; } if(isset($_POST['LessonDate'])){ $LessonDate = $_POST['LessonDate']; } if(isset($_POST['StartTime'])){ $StartTime = $_POST['StartTime']; } if(isset($_POST['EndTime'])){ $EndTime = $_POST['EndTime']; } $result = mysql_query("SELECT * FROM booking WHERE LessonDate = '".mysql_real_escape_string($LessonDate)."' AND (StartTime >= '".mysql_real_escape_string($StartTime)."' AND StartTime <= '".mysql_real_escape_string($EndTime)."')"); if(!$result) { die(mysql_error()); } if(mysql_num_rows($result) > 0) { die('<p>This date and time have already been booked. <a href="booking1.php">Please try another time</a>.</p>'); } else { //insert new user data into Users table $sql = "INSERT INTO `booking` ( `Name`, `LessonDate` , `StartTime` , `EndTime` ) VALUES( '{$Name}', '{$LessonDate}' , '{$StartTime}' , '{$EndTime}') "; mysql_query($sql) or die(mysql_error()); echo "Booking Successful.<br />"; echo "<a href='text.php'> Send reminder text </a>"; } } ?>
  20. hy there im so ashamed to ask this.What does this mean Parse error: syntax error, unexpected 'or' (T_LOGICAL_OR) i don't know i never seen it before in all my php codes well here's the full code <?php require('connection.php'); $result = mysql_query("SELECT * FROM $table_messages where reciver='$user' and read !='1'", $con); $num_rows = mysql_num_rows($result); if($num_rows =0 ){echo " no messages";}else{ echo $num_rows." messages";} ?> you know i checked all the names in db and other places and they are all correct! please help
  21. i did or thing still nothing in the page exept the include home
  22. okey no error whith this only the page is white!!! idk how plz help <?php session_start(); if(!empty($_POST['pass']) ||!empty($_POST['user']) ) { $user=$_POST['name']; $pass=$_POST['pass']; mysql_connect('localhost', 'root', '') or trigger_error("Unable to connect to the database: " . mysql_error()); mysql_select_db('forum') or trigger_error("Unable to switch to the database: " . mysql_error()); $query="SELECT * FROM users where user='$user' and pass='$pass'"; $show=mysql_query("query"); $check_e = @mysql_query($query); die(mysql_error()); if(mysql_num_rows($check_e) ==0) { echo"rong login"; } else { $_SESSION['user'] = "$user"; $_SESSION['pass'] = "$pass"; echo"hoi"; include"home.php"; }} else{ echo"empty fields"; include"home.php"; } ?>
×
×
  • 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.