wildteen88
Staff Alumni-
Posts
10,480 -
Joined
-
Last visited
Never
Everything posted by wildteen88
-
Apache won't start when not connected to home network
wildteen88 replied to johnnc's topic in Apache HTTP Server
Remove/Comment out this line Listen 192.168.1.68:80 -
Why is my PHP code rendering on my web page?
wildteen88 replied to grennibones's topic in PHP Coding Help
All PHP code should be wrapped in PHP tags <?php // your code here ?> and saved within .php files (unless your host supports other file types to be parsed by PHP). -
PHP & MYSQL installation! help!
wildteen88 replied to wtp's topic in PHP Installation and Configuration
It is recommended to add PHP to the Path Environment Variable. -
Apache won't start when not connected to home network
wildteen88 replied to johnnc's topic in Apache HTTP Server
As for your second issue, Go to Start > Programs > Accessories. Right click on Notepad and select Run as Administrator (this is required in vista to edit the hosts file), Now go to File > Open. In the Filename box type in C:\Windows\System32\drivers\etc\hosts See if you have the following line in there 127.0.0.1 localhost If you can find it, add it. Save the file and try http://localhost/ again. When this happens. Have a look at your Apache error log. -
You should always define a DOCTYPE for any HTML page. Without it your browser goes into a non standards mode called quirks mode, which can produce unexpected results.
-
Make sure you're using a valid DOCTYPE at the start of your HTML. Also you'll need to set a width to your #wrapper too.
-
Line 162 should be
-
Changing content within a page using PHP instead of frames
wildteen88 replied to carnival's topic in PHP Coding Help
Yes No, the link will be like you said earlier, eg http://www.mysite.com/index.php?page=the-page-i-am-including.html -
Ok. Open your php.ini and find the following section display_errors = Off ; Even when display_errors is on, errors that occur during PHP's startup ; sequence are not displayed. It's strongly recommended to keep ; display_startup_errors off, except for when debugging. display_startup_errors = Off Change Off to On for display_errors and display_startup_errors. Save the php.ini. Now restart Apache. If PHP is having trouble starting up with Apache then errors should display on screen. EDIT: This may not need to be done, but you it may apply When running Apache on Vista ensure you're running ApacheMonitor.exe with Administrator Privileges. To do this right the click Apache Monitor icon in the task bar and choose exit. Now go to Start > All Programs > Startup Right click on the Apache Monitor shortcut. Select the Compatibility tab and tick the Run as Administrator checkbox. Click OK to close all open windows. Now run Apache Monitor again. Confirm the UAC prompts and you should be able to restart Apache via Apache Monitor.
-
Changing content within a page using PHP instead of frames
wildteen88 replied to carnival's topic in PHP Coding Help
The basics of the code would look like <?php // check that the page var is present in the url // eg index.php?page=home.html if(isset($_GET['page']) && GET['page'] != 'index.php') { // now check to see if the requested file exists $reqFile = $_SERVER['DOCUMENT_ROOT'].'/'.$_GET['page']; if(file_exists($reqFile)) { include $reqFile; } // request file does exist. Kill the script display error else die('404 Page Not Found'); } // page is present, display the default page of your choice else include 'your_default_page.php'; ?> -
PHP & Apache install problem (PHP can't be viewed)
wildteen88 replied to Cander's topic in PHP Coding Help
I have replied to your earlier post here -
For me (using a UK English keyword) its the key above the Tab and to left of the 1 key.
-
No you're using quotes. You need to use backticks `field_name_here`
-
from is a mysql reserved word. Wrap your field names in backticks and your query should run without errors. mysql_query("CREATE TABLE $username1( `from` VARCHAR(50), `message` TEXT, `date` VARCHAR(50), `time` VARCHAR(50), `dt` VARCHAR(50), `dt2` VARCHAR(50))") or die(mysql_error());
-
You are correct this is an HTML/CSS issue. Moving to HTML Help.
-
[SOLVED] Help with wrapping the ul tag around my folders in php
wildteen88 replied to Jalz's topic in PHP Coding Help
Simply echo the opening ul tag before the foreach loop. then echo the closing ul tag after your loop. -
You have a missing closing brace. Add one before your closing php tag. To see where your code blocks start/end you should indent you code. if(isset($_GET['positionid'])) { echo $_GET['positionid']; echo '<div class="jobdetail"> <p><span class="style8">Position:</span>'.ucwords($row_rs_positiondetail['title']).'<br /> <span class="style8">Date Added:</span>'.ucwords($row_rs_positiondetail['date']).'<br /> <span class="style8">Pay:</span>'.ucwords($row_rs_positiondetail['pay']).'</p> <p class="style8">Summary: <span class="jobdetail">'.ucwords($row_rs_positiondetail['summary']).'</span></p> <p class="style8">Duties & Responsibilities: <span class="jobdetail">'.ucwords($row_rs_positiondetail['duties_responsibilities']).'</span></p> <p class="style8">Qualification Requirements: <span class="jobdetail">'.ucwords($row_rs_positiondetail['qualification_requirements']).'</span></p> <p class="style8">Education/Experience: <span class="jobdetail">'.ucwords($row_rs_positiondetail['education_experience']).'</span></p> <p class="style8">Language Skills: <span class="jobdetail">'.ucwords($row_rs_positiondetail['langauge_skills']).'</span></p> <p class="style8">Mathmatical Skills: <span class="jobdetail">'.ucwords($row_rs_positiondetail['mathmatical_skills']).'</span></p> <p class="style8">Reasoning Ability: <span class="jobdetail">'.ucwords($row_rs_positiondetail['reasoning_ability']).'</span></p> <p class="style8">Physical Demands: <span class="jobdetail">'.ucwords($row_rs_positiondetail['physical_demands']).'</span></p> <p class="style8">Work Enviornment: <span class="jobdetail">'.ucwords($row_rs_positiondetail['work_enviornment']).'</span></p> <div class="apply"> <p align="center" class="style8"><a href="apply.php?positionid='.ucwords($row_rs_positiondetail['positionid']).'">Apply For This Position</a></p> </div> </div>'; } else { if ($row_rs_positions['active'] == 'Yes') { while($row_rs_positions = mysql_fetch_assoc($rs_positions)) { echo '<div class="displayjobs"> <div class="jobheading"> <p><a href="careers.php?positionid='.ucwords($row_rs_positions['positionid']).'">'.ucwords($row_rs_positions['title']).'</a><strong> - <span class="style5">Added: '.ucwords($row_rs_positions['date']).'</span></strong></p> </div> <div class="jobdesc"> <p>'.substr($row_rs_positions['summary'], 0,150).'... <a href="careers.php?positionid='.ucwords($row_rs_positions['positionid']).'">View Position</a></p> </div> </div>'; } } else { echo '<div class="jobopenings"><p align="center">Thank you for your interest. Currently we do not have any job openings within The Company. We are, however, always accepting resumes and applications. If you would like to be considered for a future position here, please submit a resume or application <a href="submitapp.php">here</a>.</p><p align="center"><span class="pdfdownload">Download a copy of our <img src="images/pdf-icon.jpg" alt="Adobe PDF" width="16" height="15" /> <a href="downloads/pdf/employment_application.pdf">Employment Application</a> (PDF, 3690K)</span></p></div>'; } }
-
To access variables within the stdClass you can use $data->var_name However if you want convert the stdClass to an array you can do $data = (array) $data; //OR $data = get_object_vars($data);
-
I think you meant $_POST['customer_name'] not $_POST['name'].
-
Better to use isset when checking for user defined variables ($_POST, $_GET, $_COOKIE etc). This will prevent Notice messages from appearing if the variable doesn't exist. <?php if(isset($_GET['var'])){ echo $_GET['var']; //Put script here } ?>
-
The link you provided does not load for me. Are you sure you're using the correct address. Can you confirm something is set in $data? Before // FIND FIRST USEFUL INFORMATION Add echo $data; Also you're receiving the NO DATA message because php cannot find <p class="summ"> within the string that is held in the $data variable. If http://www.bloomberg.com doesn't exist/load you cannot expect your script to still function
-
EDIT: Beaten to it $string = 'Hallo my name is Jan'; $words = explode(' ', $string); foreach($words as $key => $value) { echo "$key => $value<br />"; }
-
Post the code you're using. When updating the image you just edited make sure you query looks something like UPDATE images SET image_name = 'new name', image_path = 'path/to/img' WHERE image_id = 123 The WHERE clause is very important in an UPDATE query. Without it MySQL will set all records within the table to the values you using in your query. The WHERE clause will only affect the record that matches the condition.