Search found 22 matches

by andyrichin
Wed Jan 04, 2012 1:56 pm
Forum: PHP coding => General
Topic: .htaccess Problem
Replies: 2
Views: 361

Re: .htaccess Problem

Just the .php extension. So if someone types in www.domain.com/subpage it will go to the page www.domain.com/subpage.php. Without the working .htaccess file I just get a 404 error. Plus it's easier for me someone to send a link to checkout a page without saying .php at the end. I would think most pe...
by andyrichin
Wed Jan 04, 2012 8:40 am
Forum: PHP coding => General
Topic: .htaccess Problem
Replies: 2
Views: 361

.htaccess Problem

Hello. I am trying to hide my .php extensions in my site and I am having issues with either my .htaccess file or something else that I am not doing. The code for my .htaccess file is: Options +FollowSymLinks RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f...
by andyrichin
Mon Dec 19, 2011 8:49 am
Forum: PHP coding => General
Topic: Page ID and Active Class For Navigation
Replies: 1
Views: 326

Re: Page ID and Active Class For Navigation

I came across this. Would I be able to manipulate this somehow so that the button stays active for the current page and another page? <?php function activestate($pagename, $currentpage) { if ($pagename == $currentpage) { echo "active"; } } ?> <div id="navigation"> <ul> <li class="<?php activestate($...
by andyrichin
Mon Dec 19, 2011 6:46 am
Forum: PHP coding => General
Topic: Page ID and Active Class For Navigation
Replies: 1
Views: 326

Page ID and Active Class For Navigation

I am building a site where I have each of the main navigation buttons be "active" when a user clicks and goes to that page. I am trying to figure out how to make that button stay active when users then go into a subpage of each main section. Is this possible? Here is my code: <? $path = $_SERVER['PH...
by andyrichin
Mon Nov 28, 2011 2:07 pm
Forum: PHP coding => General
Topic: Pre-Populate Form
Replies: 2
Views: 397

Re: Pre-Populate Form

So I have been able to figure this out to this point.. Form Page: <?php if(isset($form_field_name)){print stripslashes($form_field_name);}else{print "";} ?> <select name="recipient"> <option <?php if(isset($recipient) && $recipient == "Select"){print "selected=\"selected\"";} ?>>Select</option> <opt...
by andyrichin
Mon Nov 28, 2011 8:26 am
Forum: PHP coding => General
Topic: Pre-Populate Form
Replies: 2
Views: 397

Re: Pre-Populate Form

I found this code... //Place at the top <?php session_start(); if(isset($_SESSION['submitted_form_values'])){extract($_SESSION['submitted_form_values']);} ?> And something like this... <select name="fruit"> <option <?php if(isset($fruit) && $fruit == "Banana"){print "selected=\"selected\"";} ?>>Bana...
by andyrichin
Mon Nov 28, 2011 8:19 am
Forum: PHP coding => General
Topic: Pre-Populate Form
Replies: 2
Views: 397

Pre-Populate Form

I have a contact form on a site I'm building that has a "Subject" drop down field that I would like to have pre-populated based on what page the user has come from. Each content page has a "Request A Quote" button. So for instance, if the user was on the Life Insurance page, when he/she clicks the b...
by andyrichin
Mon Nov 07, 2011 9:58 am
Forum: PHP coding => General
Topic: Contact Form Problem
Replies: 0
Views: 290

Contact Form Problem

I have a contact form working on a site I built, but when I cannot change the "from" address in my email. It pulls in this address (harrisfood <harrisfood@p3nlhg730.shr.prod.phx3.secureserver.net>). In the php code how can I make this be from the senders email (whoever submits the form)? I think it ...
by andyrichin
Fri Oct 28, 2011 9:40 am
Forum: PHP coding => Mail
Topic: Email Form - From Sender
Replies: 0
Views: 651

Email Form - From Sender

I have an email form working on a site I am building, but for some reason when I test the form and send an email in my inbox i get <noreply@onlineserver.cc> as the "from" address. I would imagine it's a pretty easy fix, but I cannot seem to find it or figure it out. I want the senders email to be pl...
by andyrichin
Fri Aug 26, 2011 11:57 am
Forum: PHP coding => General
Topic: PHP Page ID
Replies: 1
Views: 321

Re: PHP Page ID

I found an example that works, but the navigation is generated through a separate HTML includes file. <?php $menu=file_get_contents("includes/menu.html"); // get the navigation list of pages $base=basename($_SERVER['PHP_SELF']); // get the current page $menu=preg_replace("|<li><a href=\"".$base."\">...
by andyrichin
Fri Aug 26, 2011 11:10 am
Forum: PHP coding => General
Topic: PHP Page ID
Replies: 1
Views: 321

PHP Page ID

Is there an easy way using PHP and CSS to have an active state for your navigation when you are on that specific page? I figured there would have to be some sort of identifier for each page, but haven't found a way that I understand in my online searching. Any thoughts?
by andyrichin
Thu Aug 25, 2011 11:49 am
Forum: PHP coding => General
Topic: PHP SimpleXML?
Replies: 0
Views: 238

PHP SimpleXML?

I am trying to create something like this: http://www.wtc.com/ ... referring to the News section at the bottom of the home page. My home page is index.php.. and I'm trying to call in an XML file. However, I am not having any luck. I cannot style is and I cannot make the XML a link. What is the best ...
by andyrichin
Thu Aug 25, 2011 8:21 am
Forum: PHP coding => General
Topic: Styling XML & Parsing Through PHP??
Replies: 7
Views: 881

Re: Styling XML & Parsing Through PHP??

I'm not sure how to actually attach the XML stylesheet to the PHP file. If I try and copy / paste it in from the XML file I get a syntax error. Any ideas?
by andyrichin
Thu Aug 25, 2011 8:01 am
Forum: PHP coding => General
Topic: Styling XML & Parsing Through PHP??
Replies: 7
Views: 881

Re: Styling XML & Parsing Through PHP??

So am I supposed to include an attached style sheet in the PHP file too?
by andyrichin
Thu Aug 25, 2011 7:05 am
Forum: PHP coding => General
Topic: Styling XML & Parsing Through PHP??
Replies: 7
Views: 881

Re: Styling XML & Parsing Through PHP??

Yes absolutely! PHP: <?php $x = simplexml_load_file('dom.xml'); //echo $x->book[0]->title[0]; //<--Calls each attribute. Book is referring to each item and the humber is referring to which book it is. //Title is calling out specific attribute and the number is calling which item it is. foreach($x->b...
by andyrichin
Thu Aug 25, 2011 6:27 am
Forum: PHP coding => General
Topic: Styling XML & Parsing Through PHP??
Replies: 7
Views: 881

Re: Styling XML & Parsing Through PHP??

Hopefully this will help illustrate my issue. If you click this link you can view the XML file and see that it is styled with CSS correctly and everything is working http://www.andyrichin.com/nastees/dom.xml However, if you click this second link you can see the PHP file that is calling the XML file...
by andyrichin
Thu Aug 25, 2011 5:47 am
Forum: PHP coding => General
Topic: Styling XML & Parsing Through PHP??
Replies: 7
Views: 881

Styling XML & Parsing Through PHP??

Is this possible? I think I am using the correct term when I am saying "parsing".. or being displayed through php? Anyway, is it possible to style the XML when you have it being read in PHP? For some reason I cannot get that to work. Any thoughts?
by andyrichin
Wed Aug 24, 2011 7:39 pm
Forum: PHP coding => General
Topic: Display XML Through PHP
Replies: 0
Views: 205

Display XML Through PHP

I am trying to create an updatable "news feed" with XML and outputting it through PHP code. I have code working so it will out put when I reload my PHP file, but I am unsure how to now stylize this text. I've attached a style sheet to the XML file, but it is not being read through the browser. Howev...
by andyrichin
Wed May 04, 2011 12:22 pm
Forum: Your Scripts
Topic: calling drop down in php
Replies: 0
Views: 968

calling drop down in php

Hello. I am using a contact form on a site I am developing, and I am having problems getting the drop downs to work. There are actually two contact forms on the site, one just has text inputs, and this works fine. I receive it in my email and all is good. Here is the example: http://time4moore.com/b...
by andyrichin
Mon May 02, 2011 7:09 am
Forum: PHP coding => Mail
Topic: script isn't diverting to correct ending location
Replies: 3
Views: 942

Re: script isn't diverting to correct ending location

I am having problems with a contact form as well. It will not send to my email. Is there any way you could provide your HTML code as well? Would be greatly appreciated.
by andyrichin
Mon May 02, 2011 7:01 am
Forum: PHP coding => Mail
Topic: PHP contact form problem with email field...
Replies: 13
Views: 2285

Re: PHP contact form problem with email field...

@Brasil360 I have been having the same issue. What did you have to do to get it to work? Would you be able to provide me with your HTML and PHP scripts? Would be awesome! Thanks.
by andyrichin
Fri Apr 29, 2011 5:09 pm
Forum: Your Scripts
Topic: Problems with Email Form
Replies: 1
Views: 1025

Problems with Email Form

I am a noob when it comes to PHP and I am trying to build an email form. I ripped some code off and built it out and now I am trying to debug why it won't actually send to my email. Once I fill in the required fields it says "your message has been sent" but I don't receive the email. Any help would ...