PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old June 20th, 2004, 05:37 AM
buzzby247 buzzby247 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 3 buzzby247 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
need some help woth this form

i have uploaded some code for you to look at. its a php form that passes the answers to a database and then autoresponds the user. or thats what it is supposed to do. can you take a look at it and tell me where i went wrong please.

here is the code
its a text file

here is the sql code
sql code in a text file

Reply With Quote
  #2  
Old June 21st, 2004, 08:28 AM
edwinbrains's Avatar
edwinbrains edwinbrains is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Location: UK
Posts: 160 edwinbrains User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 h 5 m 50 sec
Reputation Power: 5
If you actually posted the code rather than including a link to a zip file, someone may bother to help.

Reply With Quote
  #3  
Old June 21st, 2004, 08:50 AM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to dhouston
Depends, edwin, If it's short, it's definitely better to post the code. If the code's more than about 40 lines, I believe the forum rules suggest, a zip file is called for. I can't imagine this'd be more than 40 lines. How about it, buzzby?
__________________
Please don't PM me asking for solutions outside the scope of a thread.
Keeping all responses in a thread stands to help others who come along later,
which is after all what this forum's all about.

Reply With Quote
  #4  
Old June 21st, 2004, 04:20 PM
nicat23's Avatar
nicat23 nicat23 is offline
Addicted to Chaos..
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jan 2003
Location: Ft. Worth, TX
Posts: 653 nicat23 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 48 m 34 sec
Reputation Power: 0
Send a message via AIM to nicat23 Send a message via Yahoo to nicat23
The code was considerably longer than 40 lines, and he was right to post it as a zip file..

in this portion of the code
PHP Code:
 $sql "insert into getstarted(name, email, contactAddress, mobile, workHomeTel, contactPostcode, projectPostcode, projectGarden, projectLoft, projectRefit, projectXtension, shopUse, officeUse, homeUse, otherUses, engineer, partywall, projectManager, design, lifestyle, strucural, planning, buildingRegs, otherHelp, wheelchair, partialEyesight, terraced, familyChildren, semiDetached, aged, allergy, detached, other, otherNeeds, needsRefurbishment, needsExtraSpace, needsExtraLight, contemporaryDesignstyle, traditionalDesignstyle, mixedDesignstyle, progTimeComplete1month, progTimeComplete6months, progTimeComplete9months, budgetCost3kto14k, budgetCost15kto45k, budgetCostOver45k, importantThanCostYes, importantThanCostNo, importantThanCostMaybe, importantThanProgYes, importantThanProgNo, importantThanProgMaybe, importantThanDesYes, importantThanDesNo, importantThanDesMaybe, build2rent, build2sell, build2keep, otherBuildingNotes) values ('{$_POST['name']}','{$_POST['email']}','{$_POST['contact_address']}','{$_POST['mobile']}','{$_POST['workhome_tel']}','{$_POST['contact_postcode']}','{$_POST['project_postcode']}','{$_POST['project_garden']}','{$_POST['project_loft']}','{$_POST['project_refit']}','{$_POST['project_extension']}','{$_POST['use_shop']}','{$_POST['use_office']}','{$_POST['use_home']}','{$_POST['use_other']}','{$_POST['engineer']}','{$_POST['partywall']}','{$_POST['projectmanager']}','{$_POST['design']}','{$_POST['lifestyle']}','{$_POST['strucural']}','{$_POST['planning']}','{$_POST['buildingregs']}','{$_POST['otherhelp']}','{$_POST['wheelchair']}','{$_POST['partialeyesight']}','{$_POST['terraced']}','{$_POST['familychildren']}','{$_POST['semidetached']}','{$_POST['aged']}','{$_POST['allergy']}','{$_POST['detached']}','{$_POST['other']}','{$_POST['otherneeds']}','{$_POST['needrefurb']}','{$_POST['need_xspace']}','{$_POST['need_xlight']}','{$_POST['designstyle_contemporary']}','{$_POST['designstyle_traditional']}','{$_POST['designstyle_mixed']}','{$_POST['programtimecompletion_1m']}','{$_POST['programtimecompletion_6m']}','{$_POST['programtimecompletion_9m']}','{$_POST['budgetcost_3kto14k']}','{$_POST['budgetcost_15kto45k']}','{$_POST['budgetcost_over45k']}','{$_POST['importantthancost_yes']}','{$_POST['importantthancost_no']}','{$_POST['importantthancost_maybe']}','{$_POST['importantthanprogram_yes']}','{$_POST['importantthanprogram_no']}','{$_POST['importantthanprogram_maybe']}','{$_POST['importantthandesign_yes']}','{$_POST['importantthandesign_no']}','{$_POST['importantthandesign_maybe']}','{$_POST['whybuild_rent']}','{$_POST['whybuild_sell']}','{$_POST['whybuild_keep']}','{$_POST['otherbuildingnotes']}')";
$result mysql_query($sql) or print(mysql_error());
//mail($to, $subject, $msg, $additional_headers);
mail($_POST['email'],'hello there','Hello '.$_POST['name'].', thank you for filling out the form '"From: [email]athompson@building-doctors.com[/email]");
echo 
"<table border=1 cellpadding=2 cellspacing=2 ><tr><td>";
echo 
'Hello '.$_POST['name'].', thank you for filling out the form ';
echo 
"</tr></td></table>";
echo 
"<body onLoad=redirect() text=#000000 link=#00FFFF vlink=#C0C0C0>";

is any of that being executed? Wheres it hanging up at?

Reply With Quote
  #5  
Old June 22nd, 2004, 12:42 PM
edwinbrains's Avatar
edwinbrains edwinbrains is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Location: UK
Posts: 160 edwinbrains User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 h 5 m 50 sec
Reputation Power: 5
Fair points, but I'd rather be able to look at the code without having to download and save a zip file.

Reply With Quote
  #6  
Old June 22nd, 2004, 12:51 PM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to dhouston
I generally agree, provided code's wrapped in code tags. If that's the concensus, then the forum guidelines need to change to reflect it and mods need to be made aware of the change so that we can make consistent recommendations one way or the other.

Reply With Quote
  #7  
Old June 23rd, 2004, 12:29 AM
digitallysmooth digitallysmooth is offline
you know how we do
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jun 2002
Posts: 788 digitallysmooth User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 34 m 21 sec
Reputation Power: 7
Basically, for as long as I can recall, these boards rules have stated that code past 40 lines should be uploaded as an attachment.

If anyone has any reason to contest that, you should contact a forum moderator who can possibly have the rules looked into.

The post was legit so lets stick to doing what the board was meant for... Helping people!
__________________
__________________________________________________ _
Wil Moore III, MCP | Integrations Specialist | Senior Consultant
Are You Listed...? | DigitallySmooth Inc.

Reply With Quote
  #8  
Old June 23rd, 2004, 12:32 AM
digitallysmooth digitallysmooth is offline
you know how we do
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jun 2002
Posts: 788 digitallysmooth User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 34 m 21 sec
Reputation Power: 7
Lightbulb

Quote:
Originally Posted by edwinbrains
Fair points, but I'd rather be able to look at the code without having to download and save a zip file.
If you have winzip or any other archive front-end utility, you should be able to open from the web, double-click the text file inside the archive, and your text editor should fire up... Of course my assumption is that you have a text editor installed and text files are associated to it.

Should not be a huge deal.

Reply With Quote
  #9  
Old June 23rd, 2004, 12:36 AM
digitallysmooth digitallysmooth is offline
you know how we do
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jun 2002
Posts: 788 digitallysmooth User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 34 m 21 sec
Reputation Power: 7
Quote:
Originally Posted by buzzby247
can you take a look at it and tell me where i went wrong please.
Do you know where the code is failing? Is the record being added to the database? If not, you should echo the resulting SQL query to the browser and check it out.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > need some help woth this form


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT