wildteen88
Staff Alumni-
Posts
10,480 -
Joined
-
Last visited
Never
Everything posted by wildteen88
-
[SOLVED] PHP-IIS coding problem
wildteen88 replied to johnojohnson's topic in PHP Installation and Configuration
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 -
A tutorial on how to force downloads will help you
-
Yes. For more info read the manual on the imagettftext function. You should also read the manual on GD
-
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" />
-
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
-
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);
-
Its because of the textarea you have in the code you're editing it is ending your textarea prematurely.
-
[SOLVED] How to get select value from for loop
wildteen88 replied to Laonda's topic in PHP Coding Help
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. -
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.
-
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.'" />';
-
My suggestion will do what you want. Replace this $tracklisting = $_POST['tracks']; $tracklisting = array(); With the code I suggested
-
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 }
-
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);
-
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
-
Click the white box on the left hand side where the avatar is supposed to be. it'll then show you your tutorial.
-
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.
-
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>";
-
Had a quick google search
-
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
-
You have output on line 8 in question.php You cannot have any output before the use of setcookie(). Post your code here
-
[SOLVED] Unique Random Array.. Please HELP!
wildteen88 replied to Snooble's topic in PHP Coding Help
You can use array_rand. There are many functions for array's check out the many on array's -
[SOLVED] Unique Random Array.. Please HELP!
wildteen88 replied to Snooble's topic in PHP Coding Help
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. -
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; ...
-
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>
-
wrap print_r in <pre></pre> tags echo '<pre>' . print_r($unserializedcontent, true) . '</pre>';