Slight roadblock in "DW 8 with ASP, ColdFusion, and PHP: Training from the Source"
I'm working my way through Dreamweaver 8 with ASP,
ColdFusion, and PHP:
Training from the Source. I've come to the middle of Lesson 6
and have hit
my first obstacle in learning PHP. I'm following the
instructions to format
the output of the tour price calculator, but my issue is with
where to place
the following PHP code: <?php setlocale(LC_MONETARY,
'en_US'); echo
money_format('%i', $tourPrice); ?>
I placed it before the DOCTYPE and when that didn't work, I
tried inserting
right before the code that retrieves the tour price (in the
body of the
page). That didn't work either.
I also tried changing money_format to number_format and
manually inserting
the $, but when I tested everything, the output printed as
follows:
The estimated cost of your tour is
$0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000500.
I'm not quite sure where I've gone wrong.
Thanks for any help,
Heather
Coach Bob wrote:
> David,
>
> I would like to understand better your comment about the
money_format. The
> ability to use it is dependent on the host system's
support of the C library
> function strfmon(), correct? So if a user were
developing on a windows box with
> a local WAMP install it would not work while it may work
on their *nix-based
> Web host?
Check the PHP documentation - it tells you all you need to
know:
http://www.php.net/manual/en/function.money-format.php
> I will see to it that it gets corrected in the next
version of the book!
I've no idea what relationship you have with "Training from
the Source",
but I find it interesting - to say the least - that you need
to the ask
the author of a rival book.
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
Similar Messages
-
Adobe DW CS3 with ASP, Coldfusion, and PHP Training book - problem.
Hi
I have been creating a site and using the DW CS3 'Training
from the Source' book by Jeffrey Bardzell and Bob Flynn as the
tutorial text.
Basically - I have an .asp form that collects data into
fields, which are validated using the DW validate form funstions,
then passes the data to another .asp page that emails the data to
me.
All works well for me and for a lot of people I have used to
test the site....
BUT
I am getting some people whose data is obviously NOT being
captured or passed - as teh Emails are blank. I can't ask them what
browsers they are using - as their Email address should be in the
Data !!
I did try the form with the Javascript Disabled in my browser
- and the validation then failed to work - but the data still did
get sent.
1. If Javascript is disabled - how can I get the validation
to work?
2. Is there any other reason that my data may be getting lost
Thanks in Advance
PhilPhilAJ,
quote:
Surely if DW is creating this then it should aways work ?
It would be nice, wouldn't it? ;-)
There are two basic types of validation - client-side and
server-side.
Client-side validation uses JavaScript, in this case the code
that DW generates, but you are dependent on the user's browser
settings. It happens on the user's machine before anything is sent
back across the Internet to your web server. If they want to turn
off JS, they can.
Server-side validation takes place on the server with the
data sent from the user. webpro2k has provided you with a nice bit
of code to test whether those fields come in blank. If they do, you
can decide what to do with the user's interaction. Instead of the
Thank You page, or wherever you may have sent them after a
successful submission, you could send them back to the form
indicating the fields they neglected to fill out and pre-populating
those they already filled out with the data from the first
submission.
Best practice is to do both client-side (in theory it reduces
user frustration if done right.) and server side (to ensure clean
data). It takes a little extra work. You know your audience and
your needs, so you can do the cost/benefit analysis.
Regards,
Bob -
Missing File - Adobe Dreamweaver CS3 with ASP, Coldfusion, and PHP
On page 263 of Adobe Dreamweaver CS3 with ASP, Coldfusion,
and PHP by:Jeffrey Bardzel and Bob Flynn the file called
countryDetailXML.asp is missing. How can I find that file? Any
idea?
Thanks for your help.@citaiz,
That file is created earlier in the lesson in an exercise
starting on page 257. For the sake of the lesson, you can use
countryDetail.xml that is included in the lesson 09 start folder.
It is not important for this lesson that the XML is a static file
or one generated in real time from the database. The version of
Spry (1.4) that shipped with DW CS3 used XML data only. The current
version (1.6.1) can use JSON and HTML tables for the data source as
well. You can get the latest version of Spry for free at
http://labs.adobe.com/technologies/spry/,
including an extension to update your copy of DW to the latest
version.
Bob Flynn -
Adobe Dreamweaver CS3 with ASP coldfusion and PHP search?
I am working through Adobe Dreamweaver CS3 with ASP
coldfusion and PHP with the intent of creating a data base site
that primarily requires a search engine on the index page. The
search page in the book uses specific search criteria ensuring that
there will always be a match to the data base but I need to create
an input text field search engine. My Q, if there is no data within
the data base that match the variable, will it return with an error
requiring an argument in the code to respond to no matching data.
Hopefully there are comprehensive online recourses for these search
engines as they are so common. I am a complete newby to all aspects
of web development and code so it will need to be a thorough
explanation, an idiots guide. ANY HELP GREATLY APPRECIATEDRob,
Let me try to answer your questions, understanding that my
answers are laced with my experience and therefore my bias.
1. For the most part the SQL that you write for Access, MS
SQL or MySQL is going to be the same. I won't make that claim about
Oracle or PostgreSQL because I have limited or no experience in
those areas. To be sure when you head down the road with any DBMS
there are finer points on 'value added' features (to over simplify
things like MS SQL's Transact SQL), but for the most part when you
are pulling out, inserting or deleting records the SQL that you
write will be the same. In fact, I don't think I had to make any of
the SQL in the book different to deal with the back end db.
2. As for your host steering you away from MySQL, I don't
know why that would be. It is MUCH more stable and robust than
Access for web development. My research showed that you can use
MySQL just fine with ASP though that clearly wouldn't be
Microsoft's first choice.
3. A quick aside, the fact that you are building ASP on a Mac
would seem to indicate that you are developing on your production
server. That's never a good idea. Go local if you can. If you have
a newer Intel Mac you can use VM Fusion, Parallels or even Boot
Camp to run Windows in a virtual environment and develop there,
only moving your code to production when you are happy with it.
There is of course the fact that they two environments would not be
identical and you may need to change a few references, but it is
still a better practice than developing on your live site. Some web
hosts give you the ability to set up a subdomain. If yours does,
you could set one up with a duplicate of your site and develop
there.
4. Let me try to pull your 'rant-let' apart into two issue. I
begin with a question. I'm not sure what the Mac part has to do
with it. The primary language I work in at my day job is
ColdFusion. The majority of the most serious developers I know in
the CF world work on Macs. I am forced into the PC world because of
a cultural bias at the business school where I work. Having said
that, the only time I have felt there was ANY difference in the
tools, resources, choices I had was in any way affected by platform
was when Adobe still had not released Flex Builder 2 for the Mac.
Now that is behind us as well. This reaction of mine may be based
on the fact that Access never comes into play in the work that I
do. I regularly work with MS SQL and MySQL. (OK, so SQL Enterprise
Manager, the MS tool of choice to talk to MS SQL is Windows only,
but I only use that at the day job. But even there you can find
cross-platform, free tools like Aqua Data Studio to talk from a Mac
to MS SQL.) If I'm missing your point on the Mac, please let me
know. Since the advent of the Intel Mac I think it is hands-down
the best choice for a web developer. You can have Mac, Windows and
Unix all on one machine. It doesn't get any better (providing you
have the RAM :-)).
As for the security question, it is somewhat analogous to the
war on viruses and spyware. As the defenses get better, so do the
attacks. Most languages have developed functions for vetting user
input variables and best practices for building these things. It is
mainly a user education issue. When I took over the book you are
working out of, the one thing Jeffrey told me it needed was more
security. I did my best to put more in under the constraints of the
publisher. They didn't want the book to be any longer than the
previous version. I did my best to modify the code used to include
"string safe" functions and to add verbiage about the importance of
security. It was clear that I could not add as much as was needed
and I said so in the book. Much more is needed for a serious
treatment of the subject and not acknowledging that would have been
a disservice to the readers. I've been working as a developer for
over a decade and I don't know all there is to know about it. It's
a constantly changing field, just like all of web development. In
fact next week I'm going through a 2-day SANS Web Application
Security workshop in hopes of learning more. So at the risk of
sounding like an industry apologist, I don't think it's a
shortcoming of the development community. It is, as they say, "a
developing situation".
HTH,
Bob
http://bobflynn.info/ -
Dreamweaver 8 with ASP, ColdFusion and PHP Downloads
Hi,
I wondered if anyone new if there is anywhere to download the accompanying files (off the CDROM)? I can't find anywhere on the Adobe site where you can.
I purchased the book from Oxfam Bookstore and the CD is snapped in two pieces but I'd obviously like to follow the tutorials.
ThanksThat's quite an old book, so I don't know if there's still any support for it. I wrote the most recent version: "Adobe Dreamweaver CS5 with PHP: Training from the Source". The files for my book are not freely available for download, so I suspect the same is true of the Dreamweaver 8 version.
According to the publisher's website, you can request a replacement CD from [email protected] However, I wouldn't hold out much hope of getting a replacement for an old book that was bought from a charity shop. Sorry. -
ANN: Dreamweaver CS5 with PHP: Training from the Source - Rough Cuts
If you would like to get early access to my next book "Adobe Dreamweaver CS5 with PHP: Training from the Source", the first six chapters (of 12) are now available as Rough Cuts in Safari Books Online.
If you have a Safari Library subscription, you can view the chapters free of charge, and see new ones as they're added. Without a subscription, you can get access to the book in PDF format for $34.99, including the finished ebook version when the book is complete. You can also opt for the Rough Cuts PDF and Print bundle for $67.48. The print version is expected to be released in early August.FIXED!!
1)
i finally did get the message problem was with:
$mailhost='ssl://mail.domain.com';
ssl:// was just nonsense and been removed
2)
'auth' => 'true' was changed to 'auth' => 'login'
3)
for bluehost i got information that it was tls secure connection protocol not ssl
'ssl' => 'tls'
4)
port used '25' not 465.
Didnt still tried 26 and 465 maybe they would work too. -
Dreamweaver 8 with ASP, ColdFusion, and PHP
I'm having trouble with diplaying multiple recordsets. I did
everything that the book told me to do, but it doesn't work. I just
got done with the tours.asp and it works fine. Now I'm working on
the index.asp. rs_journal comes up fine, but when I add the
rs_worldregions, the page won't come up. I even uploaded the
finished sample of index.asp that came with the book and that
didn't work.
Has anyone read this book and have the same troubles?This is what the code looks like.
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="Connections/conn_newland.asp" -->
<%
Dim rs_journal
Dim rs_journal_numRows
Set rs_journal = Server.CreateObject("ADODB.Recordset")
rs_journal.ActiveConnection = MM_conn_newland_STRING
rs_journal.Source = "SELECT journalID, journal_entry FROM
tbl_journal ORDER BY journalID DESC"
rs_journal.CursorType = 0
rs_journal.CursorLocation = 2
rs_journal.LockType = 1
rs_journal.Open()
rs_journal_numRows = 0
%>
<%
Dim rs_worldregions
Dim rs_worldregions_numRows
Set rs_worldregions = Server.CreateObject("ADODB.Recordset")
rs_worldregions.ActiveConnection = MM_conn_newland_STRING
rs_worldregions.Source = "SELECT * FROM tbl_region ORDER BY
regionName ASC"
rs_worldregions.CursorType = 0
rs_worldregions.CursorLocation = 2
rs_worldregions.LockType = 1
rs_worldregions.Open()
rs_worldregions_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = -1
Repeat1__index = 0
rs_worldregions_numRows = rs_worldregions_numRows +
Repeat1__numRows
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head>
<title>Newland Tours</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1" />
<link href="css/newland.css" rel="stylesheet"
type="text/css" /></head>
<body>
<table width="750" border="0" cellpadding="3"
cellspacing="0">
<tr>
<td colspan="2" width="470"><img
src="images/banner_left.gif" width="451" height="68" alt="Newland
Tours Banner, Left." /></td>
<td width="280"><img src="images/banner_right.jpg"
width="276" height="68" alt="Newland Tour Banner, Right."
/></td>
</tr>
<tr valign="top">
<td width="180"> </td>
<td width="290"> </td>
<td width="280"> </td>
</tr>
<tr valign="top">
<td width="180" bgcolor="#DCDFD9">
<p class="navhead">Explore the Site</p>
<p>
<a href="about.asp">About Newland
Tours</a><br />
<a href="tours.asp">Find Tours</a><br />
<%
While ((Repeat1__numRows <> 0) AND (NOT
rs_worldregions.EOF))
%>
<a
href="tours_detail.asp?regionID=<%=(rs_worldregions.Fields.Item("regionID").Value)%>"><%= (rs_worldregions.Fields.Item("regionName").Value)%></a><br
/>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
rs_worldregions.MoveNext()
Wend
%>
<a href="profiles.asp">Country
Profiles</a><br />
<a href="contact.asp">Contact an
Agent</a></p>
<p><br />
© 2003 Newland Tours</p>
</td>
<td width="290">
<p>Operating since 1968, Newland Tours offers an array
of travel tours. Whether you love hiking in exotic locations or
want to get the most out of your retirement, Newland Tours has a
package for you.</p>
<p><img src="images/title_featured_vacation.gif"
width="276" height="25" alt="Featured Vacation." /></p>
<p><img src="images/temple_small.jpg" width="72"
height="90" align="left" alt="Heian Jingu Shrine, Kyoto
Prefecture." /><strong>Highlights of
Japan</strong></p>
<p class="caption"> Image: Heian Jingu Shrine, Kyoto
Prefecture</p>
<p>Get a taste for Japan's diversity, from the
serenity of its shrines to the chaos of urban life. Meet
"Fuji-san," Japan's highest mountain at 12,387
feet, visit temples, walk through gardens, and browse in Japan's
most elegant shopping districts.</p>
<p>
Only $1,199/adult and $899/child USD.
</p>
</td>
<td width="280"><p><img
src="images/title_travelers_journal.gif" width="276" height="25"
alt="Traveler's Journal." /></p>
<img src="images/icon_tj.gif" width="81" height="81"
align="right" "Traveler's Journal logo."
/><%=(rs_journal.Fields.Item("journal_entry").Value)%></td>
</tr>
</table>
<br />
<br />
</body>
</html>
<%
rs_journal.Close()
Set rs_journal = Nothing
%>
<%
rs_worldregions.Close()
Set rs_worldregions = Nothing
%> -
DW MX 2004 with asp, coldfusion, and php lesson 1
Started Jeffrey Bardzell's book, and sorry, I think I can
struggle through it even though I know little about html. In the
very first lesson I am already stumped. I am hoping there is a
simple setting that needs to be changed. In pasting text from the
contact document into the contact page, DW is supposed to
automatically enter the paragraph and line breaks, according to the
book. Mine doesnt. I have tried numerous times and the
pre-formatted text pastes in and becomes one big running paragraph.
What am I doing wrong?PhilAJ,
quote:
Surely if DW is creating this then it should aways work ?
It would be nice, wouldn't it? ;-)
There are two basic types of validation - client-side and
server-side.
Client-side validation uses JavaScript, in this case the code
that DW generates, but you are dependent on the user's browser
settings. It happens on the user's machine before anything is sent
back across the Internet to your web server. If they want to turn
off JS, they can.
Server-side validation takes place on the server with the
data sent from the user. webpro2k has provided you with a nice bit
of code to test whether those fields come in blank. If they do, you
can decide what to do with the user's interaction. Instead of the
Thank You page, or wherever you may have sent them after a
successful submission, you could send them back to the form
indicating the fields they neglected to fill out and pre-populating
those they already filled out with the data from the first
submission.
Best practice is to do both client-side (in theory it reduces
user frustration if done right.) and server side (to ensure clean
data). It takes a little extra work. You know your audience and
your needs, so you can do the cost/benefit analysis.
Regards,
Bob -
David Powers Dreamweaver CS5 with PHP training from the source mail connector problem
Hello,
first I will say great work david this is great book, and i found everything i neede in it.
I have one problem.
I have managed to get to lesson 8 and i couldnt wait so i started live project and incororated everything in it learned from this book.
But this is the problem.
I have hosting on bluehost which makes mail conector from lessons 7-8 with gmail not to send email in example when i try to recover forgoten password.
The scripts changes the token in database in users table, token is created, and i get message that the mail was sent but nothing comes to my mail.
Same password login and everything works local but on bluehost server wont send mail.
I contacted them and they said that i have to create mail on server from which mail will be sent.
I did that too.
But for what ever i put in mailconector array cant get that mail, and i really dont know what to do and who to ask.
Until this point i could get every problem solved put this bugs me because this is the last stage of what i was tryong to do and that is to incorporate login system from the book to live page.
this is the code i have:
<?php
$mailhost='ssl://mail.majapanic-tarot.com';
$mailconfig=array( 'auth' => 'true',
'username' => '[email protected]',
'password' => 'password',
'ssl' => 'ssl',
'port' => '465');
$transport=new Zend_Mail_Transport_Smtp($mailhost,$mailconfig);
Zend_Mail::setDefaultTransport($transport);
and this is what they stated in info about the mail:
Mail Server Username: majapanic+majapanic-tarot.com >>>>>>>> this plus i think is (at)
Incoming Mail Server: mail.majapanic-tarot.com
Incoming Mail Server: (SSL) box344.bluehost.com
Outgoing Mail Server: mail.majapanic-tarot.com (server requires authentication) port 26
Outgoing Mail Server: (SSL) mail.majapanic-tarot.com (server requires authentication) port 465
Supported Incoming Mail Protocols: POP3, POP3S (SSL/TLS), IMAP, IMAPS (SSL/TLS)
Supported Outgoing Mail Protocols: SMTP, SMTPS (SSL/TLS)
Please HELP!FIXED!!
1)
i finally did get the message problem was with:
$mailhost='ssl://mail.domain.com';
ssl:// was just nonsense and been removed
2)
'auth' => 'true' was changed to 'auth' => 'login'
3)
for bluehost i got information that it was tls secure connection protocol not ssl
'ssl' => 'tls'
4)
port used '25' not 465.
Didnt still tried 26 and 465 maybe they would work too. -
Errata for "Adobe Dreamweaver CS5 with PHP: Training from the Source"
There doesn't appear to be an errata page on the Peachpit/Adobe Press website for my book, so I have created one on my own website at http://foundationphp.com/phpcs5/errata.php. Many thanks to conmolbry for pointing out the problems.
FIXED!!
1)
i finally did get the message problem was with:
$mailhost='ssl://mail.domain.com';
ssl:// was just nonsense and been removed
2)
'auth' => 'true' was changed to 'auth' => 'login'
3)
for bluehost i got information that it was tls secure connection protocol not ssl
'ssl' => 'tls'
4)
port used '25' not 465.
Didnt still tried 26 and 465 maybe they would work too. -
My MacBook Air is almost filled up with "other"space and I can't find the source. What can I do to fix this and or what apps can I download to find the source and delete it. Thanks.
If you haven't restarted your computer for a while, do so. Sometimes cache files get mangled and begin expanding rapidly. A few weeks ago my iMac went from more than 500GB free to less than 20GB free in a short period of time. I knew that wasn't possible but also knew that I'd not shutdown or rebooted in over a month. After the reboot the disk was back to its normal usage and I've not seen a repeat.
If that doesn't do it, check out macupdate.com for programs such as DaisyDisk and Omni DiskSweeper to examine your drive contents. Media files (movies, digital photos, and songs) are the mostly likely culprits for taking up space. -
FlexibleUI - UICommands with Path KM and User KM from the context.
I need to write one new Java Portal Class, for new KM Command. This command should do the following action:
- get context information of KMC (specifically portal user and KM path)
- call URL with this data. (Example: http://domain:port/service?userkm=valueuserkm&pathkm=valuepathkm )
I have modify example of FlexibleUI - UICommands, and create a new class that call a URL, but can't find the class and method for get context and catch the user and path of KM user.
this is the code for the class of UICommands:
package com.sap.example.flexible.ui.command;
import java.util.List;
import com.sapportals.wcm.WcmException;
import com.sapportals.wcm.rendering.base.IRenderingEvent;
import com.sapportals.wcm.rendering.base.IScreenflowData;
import com.sapportals.wcm.rendering.uicommand.AbstractCommand;
import com.sapportals.wcm.rendering.uicommand.ICommand;
import com.sapportals.wcm.rendering.uicommand.LinkAttributes;
import com.sapportals.wcm.repository.IResourceContext;
import com.sapportals.wcm.repository.IResource;
* Copyright (c) 2005 by SAP AG. All Rights Reserved.
* SAP, mySAP, mySAP.com and other SAP products and
* services mentioned herein as well as their respective
* logos are trademarks or registered trademarks of
* SAP AG in Germany and in several other countries all
* over the world. MarketSet and Enterprise Buyer are
* jointly owned trademarks of SAP AG and Commerce One.
* All other product and service names mentioned are
* trademarks of their respective companies.
* This class is a sample implementation for a
* UICommand using external eventing.
* @author Thilo Brandt, SAP AG
* @version 1.0
public class SimpleExternalCommand extends AbstractCommand {
protected String getLabel() {
return "myButtonLabelDURO";
protected String getTooltip() {
return " myButtonTooltipDURO";
public SimpleExternalCommand() {
//super("SimpleExternalCommand", "SimpleExternalCommand");
super("myButtonTextKey", "myTooltipTextKey");
public ICommand getNewInstance() {
return this.initNewInstance(new SimpleExternalCommand());
public IRenderingEvent execute(IScreenflowData arg0) throws WcmException {
return null;
public String[] getTargetParameters() throws WcmException {
return new String[0];
//public void setTargetParameters(List arg0, IResourceContext arg1)
public void setTargetParameters(List list, IResourceContext context)
throws WcmException {
public boolean isExecutable() {
return true;
public boolean raisesEvent() {
return false;
// Inicio de Modificación de Código para uso de Parámetros
public LinkAttributes getLinkAttributes() {
String Target = "_blank";
String lURL1 = "http://www.google.com/search?hl=es&q=";
String lURL2 = "PARAMETRO";
String lURL3 = "&lr=";
// Get User KM from context
// lURL2 = UserKM;
// Get path KM from context
String lURL = lURL1 + lURL2 + lURL3;
return new LinkAttributes(lURL, Target);
please helpme to get userKM and pathKM.
thank in advance.
Junior.Hi,
To get the KM Path:
String path = getResource().getRID().getPath();
To get the present User:
IPortalComponentRequest pcr =
(IPortalComponentRequest) getProxy().getDynamicPage().getPageContext().getRequest();
pcr.getUser();
To create URL call with datas when UICommand is clicked. You should modify your getLinkAttributes method.
Check this for an example:
https://forums.sdn.sap.com/thread.jspa?threadID=334529
Greetings,
Praveen Gudapati
[Points are always welcome for helpful answers] -
Class environment teaching David Powers Training from the Source with PHP questions?
Community College classroom environment
Graphics Technology Degree (Creatives combating code)
Window 7 operating system
Second time working with the book within my class and having difficulties again. Not a problem with the book or tutorials, but the class setup. First semester working with the book XAMPP was the problem. Students working between the classroom, computer lab and home had many difficulties with the Localhost between locations. Too many problems XAMPP problems (in too many folders) for me solve. This semester I tried a third party Host. This worked well through the restyling of wordpress but we hit the wall at mysqladmin and databases. Each student has a subdomain who's mysql database is not allowed to be accessed except from within the providers control panel. Access is denied from Dreamweaver.
Hope there is someone who has a suggestion.
Thanks
Bob Canger
Graphics Instructor.If you used a VPS with WHM (web host manager)/cPanel you could provide each student with FTP and cPanel account access, which would give them phpMyadmin access. This would also be more like the "real world" in that each student would have root access to their own account. They would not all be sharing an account. As administrator you would have access to all the accounts, but the students would not have access to each other's.
-
Dreamweaver 8 with ASP, Coldfusion, & PHP
I am new to php and I am trying to work thru Dreamweaver 8
with ASP, Coldfusion and PHP Training from the Source. I have a
real simple form. A user enters their first and last name then
clicks the submit button. The form is then processed with a script
using $_GET[first_name]; $_GET[last_name]; and it should display
"Thank you, first_name last_name, for using my form." But the page
show the html with a Notice: Undefined index: first_name in
C:\htdocs\newland\test_form_processor.php on line 9. Line nine is -
<p>Thank you, <?php echo $_GET['first_name']; ?>
<?php echo $_GET['last_name']; ?>, for filling out my
form.</p>. This was accomplished using the binding panel in
DW. There is not any kind of trouble shooting in the book. Can
someone tell me what this means? It worked like it is supposed to
work when I had just the first name.Charles67 wrote:
> I am new to php and I am trying to work thru Dreamweaver
8 with ASP,
> Coldfusion and PHP Training from the Source.
I don't have a copy of that book. I wrote my own instead. ;-)
> Notice: Undefined index: first_name in
> C:\htdocs\newland\test_form_processor.php on line 9.
Line nine is - <p>Thank
> you, <?php echo $_GET['first_name']; ?> <?php
echo $_GET['last_name']; ?>, for
> filling out my form.</p>.
It means that the first_name variable isn't being passed from
the form.
PHP is case-sensitive. Your form needs to look something like
this:
<form name="form1" id="form1" method="get"
action="test_form_processor.php">
<p>First name: <input type="text" name="first_name"
id="first_name" /></p>
<p>Last name: <input type="text" name="last_name"
id="last_name" /></p>
<input type="submit" name="submit1" id="submit1"
value="Send" />
</form>
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/ -
Web Services with ColdFusion and PHP mixed
Hi,
We need to used web services provided by remote server. The
problem is the
remote server is on PHP and our server is on ColdFusion. Is
there a way to
use the web services on PHP server with our ColdFusion
server?
I understand ColdFusion automatically generate the WSDL by
adding ?wsdl
after the CFC, but I can't do the same thing because the
remote server is
not on ColdFusion. They have given us the wsdl web address,
but it seems
using the wsdl address directly without CFC is not working.
Is that right?
Please let me know.
YCFrom the coldfusion side of things, it all seems okay what
you are doing. It
is an issue with the php/wsdl side of things. I can access
the wsdl ok, but
got the same error as PaulH just then when I tried to use web
service in
cf..
"YC" <[email protected]> wrote in message
news:[email protected]...
> OK, I learned a good thing. I tired the Dreamweaver +
icon with a
> ColdFusion CFC file and it works fine. Now I learned I
don't have to code
> the <cfinvoke> tag, but just drag and drop. But
when I tried the WSDL
file:
>
http://cyfernet.ces.ncsu.edu/ws/resources.wsdl,
and "ColdFusion MX" as the
> proxy generator, I had an error. Do I need any other
option to choose
from?
> It seems "Edit Proxy Generator list" doesn't provide a
sufficient answer.
>
> I know the URL of the WSDL file is correct because I
used it to create a
web
> service in PHP locally on my laptop, and it works. From
the previous
> answers of you and PaulH, it seems if the WSDL works
with PHP, it should
> also work with any other language, right?
>
> Have you tried yourself? Did it work?
>
> YC
>
> "Eric" <[email protected]> wrote in message
> news:[email protected]...
> >
> >
> > An easy way to do this is to use the dreaweaver
'components' palette.
> > Select
> > 'web services' from the drop down list and then
click the '+' icon to
> > create
> > the call to the web service. (this uses the
cfinvoke tag)
> >
> >
> > "YC" <[email protected]> wrote in message
> > news:[email protected]...
> >> I feel very sorry to keep asking this
apparently very basic question,
but
> >> please be patient with me.
> >>
> >> Yes, it is right that I just need to consume
the pre-existing web
> >> service.
> >> This is the WSDL page:
http://cyfernet.ces.ncsu.edu/ws/resources.wsdl
and
> >> this is the web service page on the server
using it:
> >>
http://cyfernet.ces.ncsu.edu/ws/getresources-client.php,
provided as an
> >> example.
> >>
> >> So in order to have the page run in ColdFusion,
at least the following
> >> tag
> >> below should come up without an error?
> >> <cfset
> >>
> >
ws=createObject("webservice","
http://cyfernet.ces.ncsu.edu/ws/getresources-c
> > lient.php")>
> >>
> >> Sorry, but I still get an error message.
> >> I need to provide "getResourcesByCatid" as the
method and "catid" as
the
> >> parameter, but it should work only if the
previous tag works without an
> >> error, right?
> >>
> >> YC
> >>
> >>
> >> "Eric" <[email protected]> wrote in
message
> >> news:[email protected]...
> >> >>>We need to used web services
provided by remote server.
> >> >
> >> > Right, so the web service already exists -
you just want to consume
it?
> >> >
> >> >>Is there a
> >> >> >> way to use the web services
on PHP server with our ColdFusion
> > server?
> >> >
> >> > Yes - thats the whole point of web
services, you can create them in
one
> >> > language/platform and consume them in
another.
> >> >
> >> >> Whey you say "create a web service,"
do you mean I need to create a
> >> >> <cfcomponent> tag in CFC format?
Creating a CFC is not a problem,
but
> >> >> how
> >> >> can I place it on the remote server
because it is running with PHP,
> >> >> not
> >> > with
> >> >> ColdFusion?
> >> >
> >> > Sorry if I am not understanding the
question clearly, but it seems to
> >> > me
> >> > that you want to make use of an existing
php based web service. Why
do
> > you
> >> > you need to place a CFC on the php server?
You just need to execute
the
> >> > web
> >> > service from the coldfusion server using
cfml. As Paulh says:
> >> >
> >> > <cfset
ws=createObject("webservice","url to the php based web service
> >> > here")>
> >> >
> >> > The variable 'ws' being your hook into the
php web service from
within
> >> > your
> >> > cfml code.
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >> > "YC" <[email protected]> wrote in
message
> >> > news:[email protected]...
> >> >> Eric,
> >> >> Whey you say "create a web service,"
do you mean I need to create a
> >> >> <cfcomponent> tag in CFC format?
Creating a CFC is not a problem,
but
> >> >> how
> >> >> can I place it on the remote server
because it is running with PHP,
> >> >> not
> >> > with
> >> >> ColdFusion?
> >> >>
> >> >> YC
> >> >>
> >> >> "Eric" <[email protected]>
wrote in message
> >> >>
news:[email protected]...
> >> >> > >We need to used web services
provided by remote server. The
> >> >> > >problem
> >> >> > >is
> >> >> > >the
> >> >> > remote server is on PHP and our
server is on ColdFusion.
> >> >> >
> >> >> > Thats one of the main nenefits of
web services - this does not
> > matter.
> >> >> >
> >> >> >>> I understand ColdFusion
automatically generate the WSDL by
adding
> >> > ?wsdl
> >> >> >> after the CFC, but I can't do
the same thing because the remote
> > server
> >> > is
> >> >> >> not on ColdFusion.
> >> >> >
> >> >> > Sounds like you want to consume a
web service, not create one. You
> > can
> >> >> > create the call in Dreamweaver,
just look up help on calling a web
> >> >> > service. Also see Adobe site
using search for 'using web services
in
> >> >> > coldfusion'
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> > "YC" <[email protected]>
wrote in message
> >> >> >
news:[email protected]...
> >> >> >> Hi,
> >> >> >> We need to used web services
provided by remote server. The
> >> >> >> problem
> >> >> >> is
> >> >> >> the remote server is on PHP
and our server is on ColdFusion. Is
> > there
> >> > a
> >> >> >> way to use the web services
on PHP server with our ColdFusion
> > server?
> >> >> >>
> >> >> >> I understand ColdFusion
automatically generate the WSDL by adding
> >> >> >> ?wsdl
> >> >> >> after the CFC, but I can't do
the same thing because the remote
> > server
> >> > is
> >> >> >> not on ColdFusion. They have
given us the wsdl web address, but
it
> >> > seems
> >> >> >> using the wsdl address
directly without CFC is not working. Is
> >> >> >> that
> >> >> >> right?
> >> >> >>
> >> >> >> Please let me know.
> >> >> >>
> >> >> >> YC
> >> >> >>
> >> >> >
> >> >> >
> >> >>
> >> >>
> >> >
> >> >
> >>
> >>
> >
> >
>
>
Maybe you are looking for
-
Hi Im unable to create a database directory to save my cubes in EIF file format. Should we create a database directory for each user or can create one and share it to many users? if so, then is there any formalities like providing grants to other use
-
Flash 6 legacy use of _root
I use Flash about twice a year, so I really only have half a clue... I have an old Flash 6 app that I want to reuse as part of a new project. It uses _root extensively. Soooo I toldya I only have half a clue :-( Anyway, I am trying to load it into a
-
I want to open a new window for onlineHelp When I click on Help link i want to open a new window to show the appropriate help file. (instead of opening index page of help file) For this I store the URL in properties file and when the HELP LINK is cli
-
Bluetooth radio disables itself
My wife has a BlackBerry Pearl and since she is not on an enterprise server, I have it set up to connect to our home PC using Bluetooth. It works beautifully and will perform a wireless sync of her calendar and contacts whenever she is within range
-
Validity From Field is not available in Profit Center Display KE53 or Change KE52
Hello Experts, In profit center display or change in F4 help i am not able find the Validity From Date option, in this below snap shot validity To option is there but validity From Date option is not showing, can any one tell me how to get Validity f