wildteen88
Staff Alumni-
Posts
10,480 -
Joined
-
Last visited
Never
Everything posted by wildteen88
-
[SOLVED] multiple <!doctype> through </html> entries !?
wildteen88 replied to glenthecomputerguy's topic in PHP Coding Help
I notice you have three files being included library/confg.php and library/opendb.php and library/closedb.php you don't by chance have the doctype etc defined in those files do you? If you do, then you dont need to define in those files. You only need to define the doctype in the file that generates the page shown to the browser. -
How come you don't have internet connection on your Ubuntu machine? Cant you swap your Ethernet cable with the machine thats connected to the net to your Ubuntu machine temporarily? All package managers (Semantic or apt) requires an internet connection to be able to download the packages from the repositories. Without an internet connection you'll have to compile Apache, PHP and MySQL from source or download a precomiled package such as XAMPP from an internet enabled machine, then save it to CD or USB Stick. Then copy XAMPP over to your Ubuntu Machine from then CD/USB stick
-
IIS and Apache at a time on single machine.
wildteen88 replied to lakum7538's topic in Apache HTTP Server
Not strictly true the only way to have IIS and Apache run on then same computer at then same time is set then up to use different ports. Such as IIS to use port 80 and Apache to use 81 (just edit the [/b]Listen[/b] line within Apaches httpd.conf - make sure you restart Apache after making changes to the httpd.conf). problem is now http://localhost/ will always call IIS however for Apache you'll need to use http://localhost:81/ -
Php files aren't load in Apache
wildteen88 replied to adrianc.grigoras's topic in Apache HTTP Server
You cannot load both php4 and php5 as an Apache module. They'll cause conflict with each other. Remove your php4_module line. Save your httpd.conf and restart Apache. -
By default Apache serves files form the /htdocs folder (within Apaches installation folder) I recommend you clear all files from this folder first. Now go to http://localhost you should get a directory listing instead. If you still get your index page try clearing your browsers cache or a Ctrl+F5
-
How many levels are there and does the maxexp go up in a pattern (fore example goes up 7000 per level) You could do if($player->level == 1) { update ($player->maxexp = 5000); } else { $nextMaxEP = 5000 + (7000 * $player->level); update ($player->maxexp = $nextMaxEP); }
-
When checking a checkbox in HTML you should use checked="checked" rather than just checked.
-
@OP add the following lines error_reporting(E_ALL); ini_set('display_errors', 1); before this line: include('includes/connect.php'); Your code should output something, even if nothing was returned from the query. If you're getting a blank page then it seems there is an error somewhere, and thus nothing is displayed. Adding the lines I suggested above should force PHP to spit errors out if there is a problem.
-
Whats the error(s) you're getting. The things I see you should change is the following <form action = "<?php $_SERVER['PHP_SELF']; ?>" method="POST" name="insert"> Should of been <form action = "<?php echo $_SERVER['PHP_SELF']; ?>" method="POST" name="insert"> The following code $title = $_POST['pTitle']; $author = $_POST['pAuth']; $content = $_POST['pContent']; Should be within your if statement (after this line) if(isset($_POST['Submit'])) {
-
define $color as global in func1 maybe.
-
[SOLVED] Dynamic url handling at root level
wildteen88 replied to daanoz's topic in Apache HTTP Server
Change the mod_rewrite code to RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule /([a-z0-9]+) /testsite/httpdocs/projects/$1/ [NC,L] -
split will return an array To retrieve 2 you'll need to use $vars[1]
-
[SOLVED] Problem executing logout feature in a session
wildteen88 replied to Wolverine68's topic in PHP Coding Help
Change <?php If ($_SESSION['Active'] == "True") { echo "Welcome, " .$_POST['name']. "you have successfully logged into your session."; } else { echo "You have entered an invalid username and/or password. Access denied"; } ?> <form action="logout.php" method="POST"> <p>Click on the following button when you want to logout of your session: <input type="submit" value="Logout"></p> </form> to <?php If ($_SESSION['Active'] == "True") { echo "Welcome, " .$_POST['name']. "you have successfully logged into your session."; echo '<form action="logout.php" method="POST"> <p>Click on the following button when you want to logout of your session: <input type="submit" value="Logout"></p> </form>';' } else { echo "You have entered an invalid username and/or password. Access denied"; } ?> -
[SOLVED] Dynamic url handling at root level
wildteen88 replied to daanoz's topic in Apache HTTP Server
If you're using Apache as your HTTP server you can use mod_rewrite to achieve this, example RewriteEngine On RewriteRule /([a-z0-9]+)/ /projects/$1/ [NC,L] With that within a .htaccess file any url like http://locahost/xyz/ will actually call http://localhost/projects/xyz/ -
Like I said. In order for sessions to work you have to call session_start() in any page that uses $_SESSIONS's if you don't call session_start() PHP wont be able to carry over the $_SESSION variables. $_POST has not relation to sessions.
-
What are trying to do in Notepad++? Live preview? You need to explain what you're trying to do more clearly.
-
No you still need it within your display page session_start() must be called in any page that uses $_SESSION's
-
Any page that uses sessions much have session_start() as the first line. You do not have session_start() in your login page.
-
This If ($_SESSION['Active'] = "True") { should be If ($_SESSION['Active'] == "True") {
-
[SOLVED] returning a dropdown box value in my function
wildteen88 replied to Luodeni's topic in PHP Coding Help
I'd move this if ( $_POST['dateofbirthmonth'] != "") { echo "<option value=" . $_POST['dateofbirthmonth'] . " selected>" . $_POST['dateofbirthmonth'] . "</option>"; } else { echo "<option value='00' selected>M</option>"; } To within your createMonths function function createMonths() { for ( $iMonth = 1; $iMonth <= 12; $iMonth++ ) { $selected = (isset($_POST['dateofbirthmonth']) && $_POST['dateofbirthmonth'] == $iMonth) ? ' selected="selected"' : null ; echo "<option{$selected}>" . $iMonth . "</option>"; } return $iMonth; } -
[SOLVED] how do i make a function work for the whole page ?
wildteen88 replied to jamesxg1's topic in PHP Coding Help
$var or $row['myField'] can be anything you want. $siteurl = smiley($settings['siteurl']); -
[SOLVED] Errors in this file_get_contents code?
wildteen88 replied to bloodgoat's topic in PHP Coding Help
Umm by looks of it $p should be $_GET['p']; $myblog should be $_GET['myblog']; $portfolio should be $_GET['portfolio']; $musicshould be $_GET['music']; $mynews should be $_GET['mynews']; -
You could look into event listeners for this. Or alternatively you could convert your chat to use AJAX that way only the HTML tag that contains your chat refreshes rather than the whole page.
-
[SOLVED] how do i make a function work for the whole page ?
wildteen88 replied to jamesxg1's topic in PHP Coding Help
Change your function to function smiley($text) { $text = ereg_replace("", "<img src='../template/images/smiley/cheesy.gif'>", $text); $text = ereg_replace(":@", "<img src='../template/images/smiley/angry.gif'>", $text); $text = ereg_replace("", "<img src='../template/images/smiley/cool.gif'>", $text); $text = ereg_replace(":'\(", "<img src='../template/images/smiley/cry.gif'>", $text); $text = ereg_replace(":-\[", "<img src='../template/images/smiley/embarrassed.gif'>", $text); $text = ereg_replace("", "<img src='../template/images/smiley/grin.gif'>", $text); $text = ereg_replace(":-X", "<img src='../template/images/smiley/lipsrsealed.gif'>", $text); $text = ereg_replace("", "<img src='../template/images/smiley/rolleyes.gif'>", $text); $text = ereg_replace(":\(", "<img src='../template/images/smiley/sad.gif'>", $text); $text = ereg_replace("", "<img src='../template/images/smiley/shocked.gif'>", $text); $text = ereg_replace("", "<img src='../template/images/smiley/smiley.gif'>", $text); $text = ereg_replace("", "<img src='../template/images/smiley/tongue.gif'>", $text); $text = ereg_replace(":\/", "<img src='../template/images/smiley/undecided.gif'>", $text); $text = ereg_replace("", "<img src='../template/images/smiley/wink.gif'>", $text); return $text; } To use the function $myVar = smiley($row['myField']); OR <?php echo smiley($myVar); ?> -
<script type="text/JavaScript"> function refresh() { window.location="http://www.lordoftheabyss.com/chat/index.php" } function timedRefresh(timeoutPeriod) { setTimeout("refresh()",timeoutPeriod); } </script>