Forum FAQForum FAQSearchSearch MemberlistMemberlist Forum ignore listForum ignore list RegisterRegister ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in
imam problem koji ne mogu da rijesim

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Server-side
View previous topic :: View next topic  
Author Message
wxyzrusmir



Joined: 27 Jun 2005
Posts: 256
Location: Sarajevo

PostPosted: 23.09.2008 11:46    Post subject: imam problem koji ne mogu da rijesim Add user to your forum ignore list Reply with quote

raja imam problem koji ne mogu da rijesim
radi se o formi za narucivanje kombinacija asp i php

sve podatke izvuce asp i prikaze ih u formama, a php salje na mail. sve super funkcionise.

problem je u tome da u asp filu ima jedan dio sa repeat proizvoda to jeste sve sto je sa sessionid u bazi u tom momentu, pokaze sve te proizvode jedan iza drugog. kada dobijem mail pokaze mi samo zadnji proizvod iz korpe.

ne mogu da povezem da mi php file prikaze sve te proizvode.

ovo je file od php koji salje podatke na server

<?php
// get posted data into local variables
$EmailFrom = "";
$EmailTo = "";
$Subject = "Narudzba";
$Ime = Trim(stripslashes($_POST['ime']));
$Prezime = Trim(stripslashes($_POST['prezime']));
$Adresa = Trim(stripslashes($_POST['adresa']));
$Grad = Trim(stripslashes($_POST['grad']));
$State = Trim(stripslashes($_POST['state']));
$Telefon = Trim(stripslashes($_POST['telefon']));
$email = Trim(stripslashes($_POST['email']));
$Company = Trim(stripslashes($_POST['Company']));
$PDV = Trim(stripslashes($_POST['maticni']));
$Fax = Trim(stripslashes($_POST['fax']));
$Količina = Trim(stripslashes($_POST['kolicina']));
$Proizvod = Trim(stripslashes($_POST['naslov']));

// validation
$validationOK=true;
if (!$validationOK) {
print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";
exit;
}

// prepare email body text
$Body = "";
$Body .= "Ime: ";
$Body .= $Ime;
$Body .= "\n";
$Body .= "Prezime: ";
$Body .= $Prezime;
$Body .= "\n";
$Body .= "Adresa: ";
$Body .= $Adresa;
$Body .= "\n";
$Body .= "Grad: ";
$Body .= $Grad;
$Body .= "\n";
$Body .= "State: ";
$Body .= $State;
$Body .= "\n";
$Body .= "Telefon: ";
$Body .= $Telefon;
$Body .= "\n";
$Body .= "email: ";
$Body .= $email;
$Body .= "\n";
$Body .= "Company: ";
$Body .= $Company;
$Body .= "\n";
$Body .= "maticni: ";
$Body .= $PDV;
$Body .= "\n";
$Body .= "fax: ";
$Body .= $Fax;
$Body .= "\n";
$Body .= "kolicina: ";
$Body .= $Količina;
$Body .= "\n";
$Body .= "naslov: ";
$Body .= $Proizvod;
$Body .= "\n";
// send email
$success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");

// redirect to success page
if ($success){
print "<meta http-equiv=\"refresh\" content=\"0;URL=ok.htm\">";
}
else{
print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";
}
?>

u pitanju je ovaj string:
$Količina = Trim(stripslashes($_POST['kolicina']));
$Proizvod = Trim(stripslashes($_POST['naslov']));


jedina stavr na koju sumnjam jeste posto je u asp textbox ima smao jedno ime i u php file samo vuce to. ali ne vuce komplet repeat proizvoda. kako da to rijesim. hitno mi je pravo.

a ovo je dio repeat u asp:
<%
While ((Repeat3__numRows <> 0) AND (NOT narudzba.EOF))
%>
<tr class="novost_kratka">
<td class="novost_kratka">
<p style="margin-left:15;"><span class="textcrni"> <font color="#000000" size="2" face="Arial">
<input name="kolicina" type="text" id="kolicina" value="<%=((narudzba.Fields.Item("Kolicina").Value))%>" size="2">
</font></span></p> </td>
<td class="novost_kratka"><span class="textcrni"> </span>
<span class="textcrni"> </span>
<font color="#000000" size="2" face="Arial">
<input name="naslov" type="text" id="naslov" value="<%=(narudzba.Fields.Item("Naslov").Value)%>" size="50">
</font></td>
</tr>
<%
Repeat3__index=Repeat3__index+1
Repeat3__numRows=Repeat3__numRows-1
narudzba.MoveNext()
Wend
%>

ako nekome nije jasno mogu mu poslati asp code.

zahvaljujem

_________________
ideas are all that you need | www.ideaisall.com
brainstorming magazine | use the brain to get ideas | www.brainstorming.ba
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
zytzagoo
mi3.crew


Joined: 25 Aug 2003
Posts: 1842
Location: Zagreb, Hrvatska

PostPosted: 23.09.2008 16:05    Post subject: Add user to your forum ignore list Reply with quote

Cisto nagadjam, al mislim da ti je root problema zapravo krivi ispis u html-u iz asp-a.

Stavi da asp ispisuje ovako:
Code:
<input name="naslov[]" type="text" value="<%=(narudzba.Fields.Item("Naslov").Value)%>" size="50" />


Nakon toga ces na php strani imati array $_POST['naslov'][0], $_POST['naslov'][1] i sl.

gl.

_________________
[+]I[+]am[+]my[+]own[+]religion[+]
Back to top
View user's profile Send private message Visit poster's website Twitter profile
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Server-side All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group