 |
Forum PHP Romania - Discutii despre PHP, MySQL, Javascript, AJAX, etc Comunitatea PHP Romania
|
| Subiectul anterior :: Subiectul următor |
| Autor |
Mesaj |
dinamics
Data înscrierii: 26/Iun/2006
Mesaje: 2
|
| Trimis: Lun Iun 26, 2006 2:55 pm Titlul subiectului: Flash guestbook ->php+MySQL ??? |
|
|
Buna am in flash urmatorul fragment de cod: this.sendData = function ()
{
this.date = new Date();
var _loc3 = this.date.getDate() + "." + (this.date.getMonth() + 1) + "." + this.date.getFullYear();
var _loc2 = "guestbook.php?name=" + this.nameTxt_mc.txt.text + "&mail=" + this.mailTxt_mc.txt.text + "&message=" + this.messageTxt_mc.txt.text + "&date=" + _loc3;
loadVariables(_loc2, this);
this.sendBtn.buTitle.txtF.text = "";
this.sendBtn.buTitle.txtF.aniTextReverse(this.datObj.duringSend.toUpperCase(), 2);
this.nameTxt_mc.txt.aniTextOut(2, 2);
this.mailTxt_mc.txt.aniTextOut(2, 2);
this.messageTxt_mc.txt.aniTextOut(6, 2, this.unbuild, this);
this.onEnterFrame = function ()
{
if (this.eof == "TRUE")
{
this.gotoAndPlay("sending");
this._parent._parent.accessXML(this._parent._parent.xmlLink + ".xml");
delete this.onEnterFrame;
} // end if
};
};
Dupa introducerea variabilelor in formular am eroare:
Error opening URL "file:///C|/...../EasyPHP1%2D8/www/guestbook.php?name=variabila1&mail=variabila2&message=variabila3&date=26.6.2006"
iar fisierul guestbook.php arata asa
<?php
header("Content-type: text/xml");
$host = "localhost";
$user = "root";
$pass = "";
$database = "guestbook";
$linkID = mysql_connect($host, $user, $pass) or die("Could not connect to host.");
mysql_select_db($database) or die("Could not find database.");
$name="$name";
$date="$date";
$mail="$mail";
$message="$message";
$cerereSQL="INSERT INTO formular (name,date,website,text)
VALUES ('$name','$date','$mail','$message')";
mysql_query($cerereSQL);
require_once('guestbook1.php');
?>
Nu stiu unde gresesc dar nu merge, nu transmite datele.
Poate cineva sa ma lamureasca? |
|
| Sus |
|
johnutz
Data înscrierii: 20/Iul/2004
Mesaje: 956
Locație: Între scaun și tastatură
|
| Trimis: Lun Iun 26, 2006 10:08 pm Titlul subiectului: |
|
|
:lol:
esti sigur ca ai accesat guestbook-ul prin http://localhost/ ?
:lol: |
|
| Sus |
|
dinamics
Data înscrierii: 26/Iun/2006
Mesaje: 2
|
| Trimis: Mar Iun 27, 2006 7:40 am Titlul subiectului: |
|
|
Da, adica daca deschid numai guestbook.php din browser functioneaza dar nu recunoaste variabilele
Notice: Undefined variable: name in c:\program files\easyphp1-8\www\guestbook.php on line 8 |
|
| Sus |
|
Pirahna
Data înscrierii: 22/Aug/2004
Mesaje: 4558
Locație: la birou
|
| Trimis: Mar Iun 27, 2006 12:55 pm Titlul subiectului: |
|
|
ma intreb de ce
$name="$name"; |
|
| Sus |
|
PHPRomania Bot
Bot Member
Data înscrierii: 27/Dec/2007
Mesaje: 1
Locaţie: Server Google |
| Trimis: Mie Dec 26, 2007 7:01 pm Titlul subiectului: Ad |
|
|
|
|
|
| Sus |
|
| |
|