Jump to content
php.lv forumi
Sign in to follow this  
arvix

firfox un datubaze

Recommended Posts

sveiki

ir kods

$con = mysql_connect("$dbhost","$dbuname","$dbpass");
mysql_select_db("db_name", $con);

mysql_query("UPDATE teksti SET text = '$_POST[text]' WHERE id = '$_GET[id]'");

mysql_close($con);

 

Lietojot IE viss ir ok

lietojot firefox db tiek ievietots tuksums.

 

Post dati lidz sinm failam tiek.

Share this post


Link to post
Share on other sites

Es gan mainīgos ievadu šādi datubāzē! Izmantoju FireFox!

" UPDATE teksti SET text = ' " . $_POST[text]."' WHERE id = ' " .$_GET[id] . " ' "

Share this post


Link to post
Share on other sites

Kas notiek, ja pirms vaicājuma izpildes to izdrukā?

$vaicajums="UPDATE teksti SET text = '$_POST[text]' WHERE id = '$_GET[id]'";
echo $vaicajums;
mysql_query($vaicajums);

Share this post


Link to post
Share on other sites

Tiešām mistika! Kā tā var būt, ka IE ievada, bet FF nē!

Tad jau sanāk, ka kods strādā, bet kautkas FF ne tā?

Mainīgais $dbuname vai $dbname!

 

Un ko par to saka Opera?

Edited by Aikss

Share this post


Link to post
Share on other sites

<?php

//connect parametri
$server="*******";
$username="*******";
$password="*******";
$db="*******";

//pats connects
$dbh = mysql_connect($server, $username, $password) or die("Unable to connect to MySQL");
mysql_select_db($db) or die(mysql_error());

//nodefine ka mainigos 
$tavs_mainigais=$_POST['text'];
$tavs_id=$_GET['id'];


$update= mysql_query("UPDATE galerija SET kkas=$tavs_mainigais WHERE id=$tavs_id");


mysql_close($dbh);

P.S man uz FF sis kods strādā

Edited by phpjanis

Share this post


Link to post
Share on other sites

Un citas darbības(insert, select) ar DB iet uz FF?

Ja uz IE un Operas iet, bet uz FF nē tad var meiģināt pārinstalēt FF, varbūt kas noplīsis!

Share this post


Link to post
Share on other sites
Un citas darbības(insert, select) ar DB iet uz FF?

Topica autors teica, ka lietojot firefox db tiek ievietots tuksums. tatad sql izpildas

Edited by phpjanis

Share this post


Link to post
Share on other sites
Sign in to follow this  

×