Jump to content

wildteen88

Staff Alumni
  • Posts

    10,480
  • Joined

  • Last visited

    Never

Everything posted by wildteen88

  1. You will need to enable the mysql extension before you can use the mysql_* functions. Uncomment the following line (remove the semi-colon) in the php.ini ;exetension=php_mysql.dll Ensure your have setup the extension_dir directive is pointing to PHP's extensions folder. So if you have php installed in C:/php then you'll want to set the extension_dir like so extension_dir = "C:/php/ext" Save the php.ini and restart IIS
  2. A tutorial on how to force downloads will help you
  3. Yes. For more info read the manual on the imagettftext function. You should also read the manual on GD
  4. if that code is saved in a file called image.php then you'd this in your page where you want the generated image to be displayed to. <img src="image.php?text=your text here" />
  5. If the databases both relate to each other then you should only use one database. You should read up on database normalisation for how to setup your database/tables properly. But the real issue is with mysql_connect. As quoted from the manual
  6. Use htmlentities when editing the code in the textarea. When done editing use html_entity_decode, eg $edited_code = html_entity_decode($_POST['content'], ENT_QUOTES);
  7. Its because of the textarea you have in the code you're editing it is ending your textarea prematurely.
  8. Give your drop down menu a name echo "<select name=\"your_drop_down_menu_name\">"; In order for the selected value to be sent you'll need to change this echo "<option>" . $resultRow ['name'] . "</option>"; To echo "<option value=\"" . $resultRow ['name'] . "\">" . $resultRow ['name'] . "</option>"; Now you'd use $_POST['your_drop_down_menu_name'] to get the selected value.
  9. Have you even attempted to do it yourself? If you have made your site then surely you can make a users online script yourself. If you want someone to make it for you, post a request in the freelance forum.
  10. You need to make sure your wrap your attribute values in quotes, eg echo "<input type=\"input\" name=\"some name\" value=\"".$var_to_populate_field."\" />"; Or even echo '<input type="input" name="some name" value="'.$var_to_populate_field.'" />';
  11. My suggestion will do what you want. Replace this $tracklisting = $_POST['tracks']; $tracklisting = array(); With the code I suggested
  12. I'm guessing you're doing if($_POST['submit']) { // processing form here } You should check whether $_POST['submit'] exists first before using it. Example if(isset($_POST['submit'])) { // processing form here }
  13. This line $tracklisting = array(); Is overwriting this line $tracklisting = $_POST['tracks']; I guess you want to loop through the lines enter in the textarea. In which case you'll want to do This: $tracks_entered = str_replace(array("\r\n", "\r"), "\n", $_POST['tracks']); $tracklisting = explode("\n", $tracks_entered);
  14. Have a go yourself. In tutorial.php all you need to do is remove the <img> tag from the html, replace this with the text you want to see instead. I'll give you a clue its on line 86 - 87
  15. Click the white box on the left hand side where the avatar is supposed to be. it'll then show you your tutorial.
  16. That error is usually caused due to your braces { and } not matching up. You need to check your code to see if they match up.
  17. No no. Not like that. The first four lines of your code should read <?php function check_perms($path,$perm) { global $correctperms; You should remove the folowing line global $correctperms = True; Hope that clears up what I meant earlier. However after looking at your code further this section: If($configmod =! $perm){ If($correctperms){ return False; } } needs to be changed to If($configmod != $perm){ $correctperms = false; } else { $correctperms = true; } } Also <tr><td> need to be echo "<tr><td>"; and </td></tr> need to be echo "</td></tr>";
  18. Had a quick google search
  19. Why dont you try yourself first. You only have to to move one line of code, as I have suggested/shown you. You only need to wrap <tr><td> and </td></tr> around your If($correctperms) statement
  20. You have output on line 8 in question.php You cannot have any output before the use of setcookie(). Post your code here
  21. You can use array_rand. There are many functions for array's check out the many on array's
  22. This $no = array_unique($no); Should be just array_unique($no); However aren't you better of with just using shuffle as all you're doing is randomising the order of the array.
  23. You have an HTML issue. You cannot have anything except <tr><td></td></tr> between </tr> and </table>. This line global $correctperms = True; Should be within your function. function check_perms($path,$perm) { global $correctperms = True; ...
  24. tutorial.php has errors. Change lines 61 - 62 to <a href='tutorials.php?category=".$row['category']."'>".$row['category']."</a> </div></td> Change 105 - 106 to <a href='tutorials.php?category=".$row['category']."'>".$row['category']."</a></div></td>
  25. wrap print_r in <pre></pre> tags echo '<pre>' . print_r($unserializedcontent, true) . '</pre>';
×
×
  • 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.