Jump to content

Jay2391

Members
  • Posts

    167
  • Joined

  • Last visited

    Never

Everything posted by Jay2391

  1. So in my local server i have a folder call Assets and Public In the assets folder I have a PHP file call "123.php" I am trying to get my "index.php" file that is located in the public folder to include that file. the issue is that all do they are on the same server folder there not in the same folder Host -> asset -> 123.php -> public -> index.php how do I get that done. Thanks...J PS: First time I use PHP in 4 years can believe how quickly i can for get things
  2. Can someone help me understand what technology and connections you need to create a Ladder site for third party games? My Plan… I am working on a site that you can create tourneys and register results, but what will it take to get results from the actual game servers. Is apache sufficient? Is it a simple feed? Do I need to know Java? Thx
  3. i included my user name and this is what i got know Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in C:\web\xampp\htdocs\mdo_main\t.php on line 20
  4. i got a database error??? Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\web\xampp\htdocs\mdo_main\t.php on line 7 Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in C:\web\xampp\htdocs\mdo_main\t.php on line 7 Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in C:\web\xampp\htdocs\mdo_main\t.php on line 8 Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\web\xampp\htdocs\mdo_main\t.php on line 12 Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in C:\web\xampp\htdocs\mdo_main\t.php on line 12 Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in C:\web\xampp\htdocs\mdo_main\t.php on line 13 Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\web\xampp\htdocs\mdo_main\t.php on line 19 Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in C:\web\xampp\htdocs\mdo_main\t.php on line 19 Warning: mysql_fetch_assoc(): supplied argument is not
  5. I have a date 11-07-2007 22:06 and i want to know how to calculate 4 hours ahead and create a count down system $date_now $date_4hours $countdown = $date_now - $date_4hours;
  6. So i have this code that i go to this page and i display teh data from a table so i click a link that take sme to this page .. home.php?i=$1&a=$a7t=$t now i display the info and i have a submit button that have a post to say yes or no and update a table now when i click the submit button it take me to ,,,, home.php so what i did is i made it that when you post you go to home.php?i=$1&a=$a&t=$t but the code dosen't get the info back THE BOTTON LINE IS I WANT TO CLICK POST AND KEEP THE DATA FROM CLERING OUT LIKE A STICKY FORM BUT APERANTLY MY GET STATEMENT DO NOT GET THE DATA THE SECOND TIME(WHEN I CLICK POST) AND I TRY PHP_SELF that did not work :-\
  7. sorry what is rss a web site ????
  8. ??? is there any script that pulls score from a central source that you can put in you site??? example nba scores I do not want to insert the scores i want to pick them up from a location and display them on my site Thanks Jay
  9. Hope this clarifies you question on what I am looking for.... /////the code is inside md_challenge.php <?php $i =100; ////the browser shows... /////md_challenge.php?i=&a= /////the second time I click submit i get /////md_challenge.php?i=100&a=TRUE $i= $_GET['i']; $b = $_GET['b']; echo "$i and $b"; print "<form action=md_challenge.php?i=$i&a=TRUE method='post'>"; <select class="newsmall" name="i"> <option value="1">opt1</option></p> <option value="2">opt2</option></p> <option value="3">3</option></p> </select <input type="submit" name="submit" size"20" value="submit">"; } ?>
  10. all my code is inside php FYI
  11. that won't work i still have to click submit twice to get the result my issu is not the diplay is why the first time i click submit I do not get the result post on the browser???
  12. is a ticky form so i use the same page ....md_challenge.php in this case the issue is that the first time click submit .. the browser shows... $i =100; md_challenge.php?i=&a= the secint time i click submit i get md_challenge.php?i=100&a=TRUE
  13. Okay here is my issue , I am weak at the posting and HTML deal... So i have a simple drop down and I want that when i select from the drop down and click submit that my browser will change to website.php?get_something=$i&another=$b the issue is that the first time i click submit it sytays the same ...the second time it changes to the prior selection... I do not want to click twice to get my result any Ideas...here is the code i clean it up a lot but that is the main idea $i= $_GET['i']; $b = $_GET['b']; echo "$i and $b"; print "<form action=md_challenge.php?i=$i&a=TRUE method='post'>"; <select class="newsmall" name="i"> <option value="1">opt1</option></p> <option value="2">opt2</option></p> <option value="3">3</option></p> </select <input type="submit" name="submit" size"20" value="submit">"; }
  14. never mind i got it my mistake wrong testing file :-\ Im stupid
  15. I have a list that comes in during a while statement.. Jane john pete ..ect and i have a hyperlink so i can view their stats... and i want to past their name so i can get it in the next page...but the variable is not comming up ??? <a href=info.php?name=$name>".$name."</a> this is what I get http://localhost/mdo_main/info.php?name=
  16. Thanks for everything .... is all good, i have one ,more ??? the total of $pct is Example: 0.123 how can i eliminate the 0 and just display .123
  17. Example: I have a greater total of 61 and I score 45 $i= 61; $y= 45; $pct = ($i /$y) * 100; one is tha correct ??? Two how can i limit the number that result diplays (0.987654321 - i just want .987) and how do i turn off this error message??? Warning: Division by zero in localhost\info.php on line xxx
  18. :-\ now i am confuse... I need the while statement because i am getting all the names and they all need to have a hyperlink attach to click to access their profile... i do not understand what you are saying can you make notes on my code???
  19. i do quite got what you said can you give me an example
  20. I need to pull some name from a db and as they show they all have a hyperlink that will show each users profile.... i did this but it is not working...any ideas.... <?php $q= "SELECT * FROM $users ORDER BY id DESC"; $r = mysql_query($q); while($row = mysql_fetch_array($r)){ $id = $row['id']; $location = $row['location']; print '<table width="600" border="0" cellspacing="0" cellpadding="0"><tr> <tr> <td width="100" height="12" align="center" valign="middle" nowrap="nowrap" scope="col"> <div align="left" class="style9"><a href=\"info.php?id=$id\">' .$id. '</a></div></td> </tr></table>'; } ?>
  21. That is what i originaly did i was lookingfor a auto target ....thanks anyway
  22. right now my post handels goes to the same page and what i did is that if you submit and $problem= False then the information gets inserted.... now what i need is that if the information was inserted to send to a handel page that will display the content that was inserted. Example: Register here ....... information is okay.... insert and go to Handel page. this is my current comand for the submit that keeps yopu in the same page print '<form action="md_reg.php" method="post">';
  23. Here is my ??? I made a registration form and is ll okay and i can veryfy that information is not duplicated... so in my code $Problem = FALSE; and i have all my variables set... $name = John; $last = Doe; ect... So i want that when I hit submit is $Problem =False that i can send all my variables to a new page and diplay those ... so I figure i can say if $problem = false start a session but how do i send it to the next page (register_handel.php)??? when i hit submit.... I try cleanning the code the best i could you may see thing that don't make sence but the explanation is the main idea of what i need to do <?php include("required.php"); $qr_id = "SELECT id FROM $tb_users ORDER BY id DESC LIMIT 1"; $res_id = mysql_query($qr_id, $tc); $row_id = mysql_fetch_array( $res_id ); $id = $row_id['id']; ini_set ('display_error',1); error_reporting (E_ALL & ~E_NOTICE); define ('Title', 'Register'); print '<style type="text/css"> <!-- .style10 {font-size: 20px; font-family: Verdana;} --> </style>'; print '<p><div align="left" class="style10"><font color="blue">Registration Form</font></div></p>'; print '<form action="md_reg.php" method="post">'; if ( isset ($_POST['submit'])){ $problem = FALSE; ///////////////////////////PERSONAL INFORMATION///////////////////////////// if (empty ($_POST['name'])){ $problem = TRUE; $error_name = '<div align="left" class="style9"><font color="red">Please enter your "Name"</div>'; echo "$error_name"; } if (strlen ($_POST['name']) <=2){ $problem = TRUE; $error_name_short = '<div align="left" class="style9"><font color="red">Name is too short!</div>'; echo "$error_name_short"; } if (empty ($_POST['email'])){ $problem = TRUE; $error_email = '<div align="left" class="style9"><font color="red">Please enter your EMAIL</div>'; echo "$error_email"; } /////////////////////////////////agreement////////////////////////////////////////// if ($_POST['agreement'] == 'No'){ $problem = TRUE; $error_agree = '<div align="left" class="style9"><font color="red"> "You did not read the rules or did not agree with the rules"</div>'; echo "$error_agree"; } } echo "<br>"; print '<style type="text/css"> <!-- .style9 {font-size: 9px; font-family: Verdana;} --> </style> <style type="text/css"> <!-- .style7 {font-size: 10px; font-family: Verdana;} --> </style> <table width="400" border="0" cellspacing="0" cellpadding="0"><tr> <tr> <th width="220" height="12" align="center" valign="middle" nowrap="nowrap" scope="col"> <div align="center" class="style9"><font color="red"> *** Required Information *** </font></div></th> </tr> <th width="80" height="12" align="center" valign="middle" nowrap="nowrap" scope="col"> <div align="left" class="style9">USER NAME:</div></th> <td width="200" height="12" align="center" valign="middle" nowrap="nowrap" scope="col"> <div align="left" class="style9"><input type="text" name="natgalid" size"100" value="' . $_POST['natgalid'] . '"/></div></td> <td width="200" height="12" align="center" valign="middle" nowrap="nowrap" scope="col"> <div align="left" class="style9"><font color="blue">create a user name</div></td> </tr> <th width="80" height="12" align="center" valign="middle" nowrap="nowrap" scope="col"> <div align="left" class="style9">NAME:</div></th> <td width="200" height="12" align="center" valign="middle" nowrap="nowrap" scope="col"> <div align="left" class="style9"><input type="text" name="name" size"100" value="' . $_POST['name'] . '"/></div></td> <td width="200" height="12" align="center" valign="middle" nowrap="nowrap" scope="col"> <div align="left" class="style9"><font color="blue">enter your name</div></td> </tr> <th width="80" height="12" align="center" valign="middle" nowrap="nowrap" scope="col"> <div align="left" class="style9">EMAIL:</div></th> <td width="200" height="12" align="center" valign="middle" nowrap="nowrap" scope="col"> <div align="left" class="style9"><input type="text" name="email" size"100" value="' . $_POST['email'] . '"/></div></td> <td width="200" height="12" align="center" valign="middle" nowrap="nowrap" scope="col"> <div align="left" class="style9"><font color="blue">enter your e-mail</div></td> </tr> <tr> <th width="220" height="12" align="center" valign="middle" nowrap="nowrap" scope="col"> <div align="center" class="style9"><font color="red"> *** Agreement *** </font></div></th> </tr> <tr> <th width="80" height="12" align="center" valign="middle" nowrap="nowrap" scope="col"> <div align="left" class="style9">Agreement:</div></th> <td width="200" height="12" align="center" valign="middle" nowrap="nowrap" scope="col"> <div align="left" class="style9"><select name="agreement"> <option value="No"> I Do Not Agree </option></p> <option value="Yes"> I Agree </option></p> </select></div></td> </tr> </table>'; print '<br><input type="submit" name="submit" size"20" value="Register!!"/><br /></h4>'; if ($problem == FALSE){ $name = $_POST['name']; $email = $_POST['email']; $pass = $_POST['pass']; } ?>
  24. what about the first option on the side of the text box???
×
×
  • 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.