Search found 9 matches

by kennyharrill
Mon Jul 22, 2013 3:59 am
Forum: PHP coding => General
Topic: Need help with named variable & include statement
Replies: 10
Views: 1825

Re: Need help with named variable & include statement

Awesome! That worked! Thanks so much!! Appreciate it!!
by kennyharrill
Fri Jul 19, 2013 5:56 am
Forum: PHP coding => General
Topic: Need help with named variable & include statement
Replies: 10
Views: 1825

Re: Need help with named variable & include statement

It is. In this example, the first would be emails/001.php, then 002 and so on. Sorry for the confusion.

Maybe this will help:

Our file emails.php:

<?php
$emno = "emails/$em.php";
include "$emno";
?>

Our file emails.shtml:

<a href="emails.php?em=001">Open Letter</a>
by kennyharrill
Fri Jul 19, 2013 5:32 am
Forum: PHP coding => General
Topic: Need help with named variable & include statement
Replies: 10
Views: 1825

Re: Need help with named variable & include statement

$emno refers to separate php files in a directory called emails. The php file with this code is used in connection with an shtml file called "emails.shtml". The files in the emails directory are consecutively numbered. Each individual email is referred to by a link, i.e., "emails.php?em=001". Don't ...
by kennyharrill
Fri Jul 19, 2013 3:54 am
Forum: PHP coding => General
Topic: Need help with named variable & include statement
Replies: 10
Views: 1825

Re: Need help with named variable & include statement

Sorry, but I still just get a blank page when I click the link. Adding the "echo" didn't help.
by kennyharrill
Thu Jul 18, 2013 4:11 am
Forum: PHP coding => General
Topic: Need help with named variable & include statement
Replies: 10
Views: 1825

Re: Need help with named variable & include statement

<?php
echo $emno
$emno = "emails/$em.php";
include "$emno";
?>

I'm assuming you meant this. I tried this and now all I get is a blank page.
by kennyharrill
Wed Jul 17, 2013 8:13 am
Forum: PHP coding => General
Topic: Need help with named variable & include statement
Replies: 10
Views: 1825

Need help with named variable & include statement

Below is a partial bit of the code I am using in a php file. This particular file is called emails.php. This used to work for me: <br>           <a href="emails.shtml">Back to the main e-mails page.</a> <br><br> <?php $emno = "emails/$em.php"; includ...
by kennyharrill
Tue Apr 09, 2013 3:03 am
Forum: PHP coding => General
Topic: Text won't display from my "include"
Replies: 5
Views: 843

Re: Text won't display from my "include"

An example file is 123.php. The individual php files in this case have just text, an article, shared e-mail, etc.
by kennyharrill
Mon Apr 08, 2013 6:06 pm
Forum: PHP coding => General
Topic: Text won't display from my "include"
Replies: 5
Views: 843

Re: Text won't display from my "include"

<?php $mlno = "emails/$ml.php"; include "$mlno"; ?> I changed the first line to <?php. $mlno is a named variable - "ml" is a number for a specific file in the emails directory. But when I click on a link to show any particular php file in the emails directory, all it shows is the message at the top ...
by kennyharrill
Mon Apr 08, 2013 12:48 pm
Forum: PHP coding => General
Topic: Text won't display from my "include"
Replies: 5
Views: 843

Text won't display from my "include"

Below is the php code from an email file I'm working with. When I go to my website, the file that is supposed to be in "include" (rather text) does not display: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <head> <head> <meta http-equiv="content-type" content="text/html;charset=UTF...