/ Forside / Teknologi / Udvikling / PHP / Nyhedsindlæg
Login
Glemt dit kodeord?
Brugernavn

Kodeord


Reklame
Top 10 brugere
PHP
#NavnPoint
rfh 3959
natmaden 3372
poul_from 3310
funbreak 2700
stone47 2230
Jin2k 1960
Angband 1743
Bjerner 1249
refi 1185
10  Interkril.. 1146
detection
Fra : Anders Thingholm


Dato : 04-07-01 14:30

Hej

Kan nogen se hvorfor disse 2 script ikke spiller?


Indholg af "index.php":

<HTML>
<head>
<title>Detection</title>
<SCRIPT LANGUAGE="JavaScript">

<!-- begin
function display() {
window.onerror=null;

colors = window.screen.colorDepth;
document.form.color.value = Math.pow (2, colors);
if (window.screen.fontSmoothingEnabled == true)
document.form.fonts.value = "Yes";
else document.form.fonts.value = "No";

document.form.navigator.value = navigator.appName;
document.form.version.value = navigator.appVersion;
document.form.colordepth.value = window.screen.colorDepth;
document.form.width.value = window.screen.width;
document.form.height.value = window.screen.height;
document.form.maxwidth.value = window.screen.availWidth;
document.form.maxheight.value = window.screen.availHeight;
document.form.codename.value = navigator.appCodeName;
document.form.platform.value = navigator.platform;
if (navigator.javaEnabled() < 1) document.form.java.value="No";
if (navigator.javaEnabled() == 1) document.form.java.value="Yes";

if(navigator.javaEnabled() && (navigator.appName != "Microsoft Internet
Explorer")) {
vartool=java.awt.Toolkit.getDefaultToolkit();
addr=java.net.InetAddress.getLocalHost();
host=addr.getHostName();
ip=addr.getHostAddress();
alert("Your host name is '" + host + "'\nYour IP address is " + ip);
}
}
// end -->
</script>

</head>
<BODY OnLoad="display()">

<form method="POST" action="save_info.php" name="form">
<input type=hidden name=width>
<input type=hidden name=height>
<input type=hidden name=navigator>
<input type=hidden name=maxwidth>
<input type=hidden name=maxheight>
<input type=hidden name=version>
<input type=hidden name=colordepth>
<input type=hidden name=codename>
<input type=hidden name=platform>
<input type=hidden name=color>
<input type=hidden name=java>
<input type=hidden name=fonts>
</form>
</body>
</html>

Indhold af "save_info.php"

<?php
include("dbconnect.inc");

$insertSQL = sprintf("INSERT INTO detection (width, height, navigator,
maxwidth, maxheight, version, colordepth, codename, platform, color, java,
fonts) values ('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s',
'%s', '%s')", addslashes($width), addslashes($height),
addslashes($navigator), addslashes($maxwidth), addslashes($maxheight),
addslashes($version), addslashes($colordepth), addslashes($codename),
addslashes($platform), addslashes($color), addslashes($java),
addslashes($fonts));

mysql_query($insertSQL);

echo mysql_error();

?>


VH

Anders Thingholm



 
 
Mickey (04-07-2001)
Kommentar
Fra : Mickey


Dato : 04-07-01 16:03

"Anders Thingholm" <anders@thingholm.dk> skrev:

> <input type=hidden name=width>
> <input type=hidden name=height>
> <input type=hidden name=navigator>
> <input type=hidden name=maxwidth>
> <input type=hidden name=maxheight>
> <input type=hidden name=version>
> <input type=hidden name=colordepth>
> <input type=hidden name=codename>
> <input type=hidden name=platform>
> <input type=hidden name=color>
> <input type=hidden name=java>
> <input type=hidden name=fonts>

du har ingen value på dine felter


--
|-|$235-|)k - Mickey
Ekstra Bladet om humor:
"Det havde Jesus. (Forvandler man vand til vin, så har man humor)."
http://ekstrabladet.dk/VisArtikel.iasp?PageID=129465



Søg
Reklame
Statistik
Spørgsmål : 177560
Tips : 31968
Nyheder : 719565
Indlæg : 6408943
Brugere : 218888

Månedens bedste
Årets bedste
Sidste års bedste