Jump to content

wildteen88

Staff Alumni
  • Posts

    10,480
  • Joined

  • Last visited

    Never

Everything posted by wildteen88

  1. How are you accessing setup.php? You should be going to http://yoursite.com/phpmyadmin/scripts/setup.php
  2. You first need to readup on your MYSQL sytax. Use SELECT to retrieve data from a table. To run a query in PHP use the mysql_query function, followed by mysql_fetch_assoc You'll find helpful tutorials over at http://www.php-mysql-tutorial.com/
  3. Make sure you have display_errors turned on and that error_reporting is set to E_ALL.
  4. No, array_shift will remove the first item from the array and return its value. shuffle randomises the order of the items within the array. Actually dump shuffle and array_shift and just use array_rand instead.
  5. You need to readup on the documentation for the ENUM field, ENUM allows to set certain values that the field excepts, such as 'yes' and 'no'
  6. Reading your first post, $a should hold a collection of ids correct? and you're want to select an id from the $a array at random? Well change $_SESSION['MissionID'] = $a; to $_SESSION['MissionID'] = array_shift($a);
  7. Data types such as INT and ENUM must have a length/value set, eg INT(11) or ENUM('option1','option2') PHPMyAdmin provides a length/value field. What is the purpose of the hope table?
  8. Current setup which is my first self build Intel C2Duo E6400 -Overclocked @ 3.0GHz - cant get it to 3.2GHz ASUS P5B Deluxe Nvidia GeForce 8800GTS 320mb - some EVGA OC Edition RAM: GeIL 2GB PC6400 2 x 250GB Hard Disks (1st: XP, 2nd: Vista and Ubuntu) Monitor: 20" Samsung SyncMaster 206BW Took me a while to get XP, Vista and Ubuntu to successfully triple boot.
  9. file_get_contents or the long way fopen/fread/fclose
  10. $time = array( "html" => "<b>$name</b><br>Solo", // "style" => "background-color: $color", // use style property to change the background color "interval" => $intrv // set the interval for 2hrs );
  11. append the username to the query, select SUM(amount) AS Total FROM activity_table where status=1 AND username='$username'
  12. You'll first need to define the generated code within a string. Example <?php if(isset($_POST['submit'])) { $code = '<?php' . PHP_EOL; $code .= '$pages = ' . $_POST['numberofpages'] . PHP_EOL; $code .= '?>'; echo '<p>' . highlight_string($code, true) . '</p>'; } else { echo "<form name=\"addpage\" action=\"test.php\" method=\"POST\"> <select name=\"numberofpages\"> <option value=\"1\">1</option> <option value=\"2\">2</option> </select> <br> <input type = \"submit\" name=\"submit\" value=\"submit\"> </form>"; }
  13. Have look into PHP Frameworks, such as Code Ignitor, CakePHP or Zend Framework.
  14. Just declare/use a variable as you normally would do
  15. You'll need to provide an area for editing the page content then, like a blog interface for example. You can use editors such as FCKEditor or TinyMCE embedded into your page so your users can easily edit the pages content.
  16. Yes, you'll need to use mod_rewrite
  17. You might want to look into array_multisort instead.
  18. No not really. You should really learn to code PHP yourself. However you should first create a static design using HTML/CSS, that way you can get everything to your liking. Afterwards add in the PHP code. WYSIWYG is only good for HTML really. Most IDE's which spit out PHP for you is very messy and becomes a nightmare when you get an error or something doesn't quite work right.
  19. PHP can loop through objects within an array too, so CV code still applies, example foreach($data['profile:details'] as $key => $obj) { echo '<p><b>' . $obj->name . "</b>\n"; echo '<select>'; foreach($obj->options as $key => $value) { echo "\n <option value=\"$key\">$value</option>"; } echo "\n</select><p>\n\n"; }
  20. Any reason why you're using fastcgi? Loading PHP as an Apache module is alot easier.
  21. Make sure you have restarted EasyPHP.
  22. Make sure you're downloading the correct package. You should download the PHP 5.2.6 zip package. Extract the contents of the zip to where PHP is installed. php5apache2_2.dll should be located in to the root of the PHP Installation folder.
  23. Do it as $message = "$name from $country wants to join your mailing list! Their email is $email"; mail( "[email protected]", "New Mailing List Subscriber!", $message, "From: $email" );
×
×
  • 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.