Jump to content

BillyBoB

Members
  • Posts

    630
  • Joined

  • Last visited

    Never

Everything posted by BillyBoB

  1. yes it means string postion and i think it would mean where the string is in the string [code] <?php $mystring = 'abc'; $findme  = 'a'; $pos = strpos($mystring, $findme); // Note our use of ===.  Simply == would not work as expected // because the position of 'a' was the 0th (first) character. if ($pos === false) {   echo "The string '$findme' was not found in the string '$mystring'"; } else {   echo "The string '$findme' was found in the string '$mystring'";   echo " and exists at position $pos"; } // We can search for the character, ignoring anything before the offset $newstring = 'abcdef abcdef'; $pos = strpos($newstring, 'a', 1); // $pos = 7, not 0 ?> [/code]
  2. i found somthing simular and i like it but thanks tho
  3. can i make a drop down list that has files that are in a directory ? i have halo 2 pics from in game and i want to make a drop down box to show all the pics in the halopics/ dirctory please help heres wat i have so far: [url=http://dreamshowstudios.net/viewpic.php?pic=pic-1]http://dreamshowstudios.net/viewpic.php?pic=pic-1[/url] this isnt the drop down box this is just the pic and another feature
  4. anything else i mean i dont have control over the apache i dont think my cpanel ver and build is : 10.8.2-RELEASE 119
  5. heres the error [code] Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, webmaster@dreamshowstudios.net and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. Apache/1.3.36 Server at www.dreamshowstudios.net Port 80 [/code] im running with cpanel
  6. probably cuz any thing divided my 0 = 0 :)
  7. nvm i thought that was the connect srry :) my bad i will delete taht post :)  ;D
  8. ok well the answer would be ... make a form with both new pass old pass and confpass then use this if statment [code] if($newpass==$confpass) { //success whatever u do here }else{ echo("Your passwords don't match!"); } [/code]
  9. the line [code] $assoc = mysel_fetch_assoc[$query]; [/code] should be [code] $assoc = mysql_fetch_assoc[$query]; [/code]
  10. um can u edit it cuz i dont really get wat your saying
  11. well heres tut on all of it #1 : [url=http://techtuts.com/?view=tutorials&act=tutorial&id=8]http://techtuts.com/?view=tutorials&act=tutorial&id=8[/url]This tutorial will teach you how to make a complete user system! #2 : [url=http://techtuts.com/?view=tutorials&act=tutorial&id=10]http://techtuts.com/?view=tutorials&act=tutorial&id=10[/url]This will show who is online! #3 : [url=http://techtuts.com/?view=tutorials&act=tutorial&id=12]http://techtuts.com/?view=tutorials&act=tutorial&id=12[/url]The private message system! #4 : [url=http://techtuts.com/?view=tutorials&act=tutorial&id=35]http://techtuts.com/?view=tutorials&act=tutorial&id=35[/url]Create an admin panel for your user system! hope these help
  12. hmm i dont really know i havnt used REQUEST srry
  13. lol tell me about it i have been working a site for like a month http://dreamshowstudios.net :)
  14. i do mine a lil diff but here would be my sample code [code] function dbConnect ( ) { if($this->dbconnection == ""){ while($i!=5){ $this->dbconnection = mysql_connect($this->dbhost, $this->dbuser, $this->dbpass, true); mysql_select_db($this->dbname, $this->dbconnection); sleep(1); $i++ } if($this->dbconnection == ""){ print (mysql_error($this->dbconnection)); } } [/code] now most of that is based off your code i dont do the exact same way! edited to your needs
  15. nope i dont think so theres a difference in what you get when your info is posted via POST or REQUEST
  16. well im not goin to really make u the site cuz that takes work but i can show you have to make the pm system do u already have a login system up ?
  17. um php is server side you would have to install php and apche and stuff it would be a hastle
  18. but if he just used a txt and there would be no load :)
  19. that is a easy fix [code] <?php // we must never forget to start the session session_start(); if (!$link = mysql_connect('localhost', 'davessonicsite', 'password')){   echo 'Could not connect to mysql';   exit; } if (!mysql_select_db('davessonicsite', $link)){   echo 'Could not select database';   exit; } $errorMessage = ''; if (isset($_POST['txtUserId']) && isset($_POST['txtPassword'])) {     // first check if the number submitted is correct     $number  = $_POST['txtNumber'];         if (md5($number) == $_SESSION['image_random_value']) {       //  include 'library/config.php';       //  include 'library/opendb.php';                 $userId  = $_POST['txtUserId'];         $password = $_POST['txtPassword'];                     // check if the user id and password combination exist in database         $sql = mysql_query("SELECT * FROM chaoworld_b WHERE username = '$userId' ") or die(mysql_error()); //second change         $sql = mysql_fetch_array($sql);         if($userId==''|$password==''){             $errorMessage = 'Sorry, you left somthing blank!';                     }else{         if ($sql['password']==$password) { // I don't really know wat the PASSWORD($password) thing did so i left it out u can add it tho             // the user id and password match,              // set the session             $_SESSION['image_is_logged_in'] = true;             // remove the random value from session                        $_SESSION['image_random_value'] = '';                         // after login we move to the main page             header('Location: login.php');             exit;         } else {             $errorMessage = 'Sorry, wrong user id / password';         }         }       //  include 'library/closedb.php';     } else {         $errorMessage = 'Sorry, wrong number. Please try again';     }    } ?> <html> <head> <title>Basic Login</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <?php if ($errorMessage != '') {  // first change i dont like coding practice u used echo("<p align=\"center\"><strong><font color=\"#990000\">"); echo $errorMessage; echo("</font></strong></p> "); } ?> <form action="" method="post" name="frmLogin" id="frmLogin"> <table width="500" border="1" align="center" cellpadding="2" cellspacing="2">   <tr>   <td width="150">User Id</td>   <td><input name="txtUserId" type="text" id="txtUserId"></td>   </tr>   <tr>   <td width="150">Password</td>   <td><input name="txtPassword" type="password" id="txtPassword"></td>   </tr>   <tr>   <td width="150">Enter Number</td>   <td><input name="txtNumber" type="text" id="txtNumber" value="">     &nbsp;&nbsp;<img src="randomImage.php"></td>   </tr>   <tr>   <td width="150">&nbsp;</td>   <td><input name="btnLogin" type="submit" id="btnLogin" value="Login"></td>   </tr> </table> </form> </body> </html> [/code] try it again plz it was the exit(); u didnt put the () on urs thats why it dont work the same as mine
  20. um somtimes but not if your just setting it to one folder that doesnt have anything in it
×
×
  • 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.