Go Back   Webmaster Malaysia Forum » Website Design & Development » Website Programming

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 21-03-2003, 04:14 PM
GGG's Avatar
GGG GGG is offline
New kid on the block
 
Join Date: Mar 2003
Posts: 3
Rep Power: 0
GGG is on a distinguished road
2form sekali submit

Salam,
Nih aku nak tanya sesiapa yang pakar..

Aku nak cuba buat user hantar form..contoh nak hantar maklumat diri dan upload gambar..tapi info maklumat diri pakai script lain dan upload gambar script lain..aku tak nak menyusahkan user supaya masukkan maklumat 2 kali...contoh maklumat diri dengan maklumat gambar seperti nama email semua sekali submit jer..tapi kita gunakan variable yang sama..so bila kita terima email tentang sesuatu submision dari user kita akan terima 2 email 1 mengenai diri user dan satu lagi mengenai upload gambar...sebagai ringkasan la kan aku tunjuk contoh code

<form enctype="multipart/form-data" action="MAKLUMATDIRI.CGI" method="POST">
<form enctype="multipart/form-data" action="UPLOAD.cgi" method="POST">

blablablbalbal
balablabala

<button submit>
</FORM>

see 2 from 1 submit...


so any idea cam mana nak buat benda seumpama nie?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 21-03-2003, 07:04 PM
mbek's Avatar
Novice Webmaster
 
Join Date: Feb 2003
Location: my-sahabat.org
Posts: 20
Rep Power: 0
mbek is on a distinguished road
Send a message via Yahoo to mbek
Exclamation

sorry kalau salah pemahaman...

confius...
1. kenapa mesti buat 2 form??
2. kenapa kene anta 2 email??
(boleh jalan ke 2 form 1 submit button?????????????????)

* kanapa x just 1 form n 1 email???

i c, u guna 2 separate cgi...

ok y not u just sekalikan input utk file location kedlam form maklumat diri...

eg.

<form action=cgi.cgi method=post>
name: <input type=text name=name value='">
.............bla bla.. bla....
Upload Photo:<input type=file name=file_location>

<input type=submit name=submit value=submit>
</form>

ok.... cgi ..

after that u will submit that form ke class utk save kan maklumat ke db(or wat eve file u use)

cth..

sub saveinfo{
bla.. bla...
bla.. bla...
bla.. bla...
bla.. bla... bla.. bla...
bla... bla...

#after finish save all the info u pass another virable to class upload
&upload();
&sendmail();
}

sub upload{
bla....bla...
#u'r upload script goes here
}
sub sendmail{
bla....bla...
#u'r sendmail script goes here
}

if u use another script try do like this...

sub saveinfo{
bla.. bla...
bla.. bla...
bla.. bla...
bla.. bla... bla.. bla...
bla... bla...

#after finish save all the info u pass another virable to class upload
require"$scriptdir/upload.cgi";
&upload();#if there is no class .. just ignore this line
&sendmail();
}

kalau ikut flow kat atas tu... virable yg u post still bleh pakai selagi x exit.

ok.... hope leh membantu....
kalau salah.. inform me

c ya...
__________________
me, myself & mbek
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 22-03-2003, 02:22 AM
GGG's Avatar
GGG GGG is offline
New kid on the block
 
Join Date: Mar 2003
Posts: 3
Rep Power: 0
GGG is on a distinguished road
err sorry mbek...i tak paham..boleh ke kalau kite buat script cam tu maksud i..after i submit info diri kita boleh guna "REQUIRE" dan hantar ke satu lagi cgi script...kalau u boleh tolong i u boleh kasi satu sample tak?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 23-03-2003, 04:37 PM
DingDang's Avatar
Normal User
 
Join Date: Jul 2001
Location: eRakan.Net
Posts: 118
Rep Power: 92
DingDang is on a distinguished road
Send a message via ICQ to DingDang Send a message via Yahoo to DingDang
setuju dengan mbek. basically, HTML tak boleh submit 2 form (as far as i know, and correct me if i was wrong).

dan untuk kes 2 script, takda cara lain melainkan dari ubah struktur skrip yang digunakan, supaya ianya hanya menggunakan satu script sahaja.

dan kalau ggg tak tau nak wat camana (dengan merujuk cara mbek), saya cadangkan untuk cgg attachkan kedua2 fail cgi itu di sini untuk kita sama2 membantu.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 24-03-2003, 10:45 AM
mbek's Avatar
Novice Webmaster
 
Join Date: Feb 2003
Location: my-sahabat.org
Posts: 20
Rep Power: 0
mbek is on a distinguished road
Send a message via Yahoo to mbek
yup.. i agree with dingdang ... attch ur file here
__________________
me, myself & mbek
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Should i submit my url to SE nobita Other Internet Marketing Methods 1 20-09-2005 12:08 AM
submit script help coolbuzz Website Design 5 26-04-2005 09:42 AM
offer sekali sahaja hellmeter Mamak Stall 0 07-02-2003 06:54 AM
offer sekali sahaja hellmeter FeedBack & Suggestion 0 07-02-2003 06:52 AM
offer sekali sahaja hellmeter Other Webmaster-related Services and Promotion 0 07-02-2003 06:48 AM


All times are GMT +8. The time now is 03:23 AM. Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0 vBulletin skin by ForumMonkeys.com.


WebmasterMalaysia.com is Proudly Hosted by Exabytes Semi Dedicated Server.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61