Overstappen vanaf MySQL-functies
Edit:
Titel aangepast.
Ik had een vraag hoe moet ik dit veranderen
Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/bussen1b/public_html/p2000.php on line 10
Notice: Undefined offset: 0 in /home/bussen1b/public_html/p2000.php on line 266
Notice: Undefined variable: straat in /home/bussen1b/public_html/p2000.php on line 266
Notice: Undefined variable: stad in /home/bussen1b/public_html/p2000.php on line 266
Notice: Undefined offset: 0 in /home/bussen1b/public_html/p2000.php on line 266
Notice: Undefined offset: 0 in /home/bussen1b/public_html/p2000.php on line 266
Notice: Undefined variable: straat in /home/bussen1b/public_html/p2000.php on line 266
Notice: Undefined variable: stad in /home/bussen1b/public_html/p2000.php on line 266
Notice: Undefined offset: 0 in /home/bussen1b/public_html/p2000.php on line 266
Notice: Undefined offset: 0 in /home/bussen1b/public_html/p2000.php on line 266
Notice: Undefined variable: straat in /home/bussen1b/public_html/p2000.php on line 266
Notice: Undefined variable: stad in /home/bussen1b/public_html/p2000.php on line 266
Notice: Undefined offset: 0 in /home/bussen1b/public_html/p2000.php on line 266
Notice: Undefined offset: 0 in /home/bussen1b/public_html/p2000.php on line 266
Notice: Undefined variable: straat in /home/bussen1b/public_html/p2000.php on line 266
**knip**
Notice: Undefined variable: stad in /home/bussen1b/public_html/p2000.php on line 266
Notice: Undefined offset: 0 in /home/bussen1b/public_html/p2000.php on line 266
Notice: Undefined offset: 0 in /home/bussen1b/public_html/p2000.php on line 266
Notice: Undefined variable: straat in /home/bussen1b/public_html/p2000.php on line 266
Notice: Undefined variable: stad in /home/bussen1b/public_html/p2000.php on line 266
Notice: Undefined offset: 0 in /home/bussen1b/public_html/p2000.php on line 266
Ik heb ook een sql bestand van google maps gebruikt maar hoe moet ik dat daar in krijgen
Toevoeging op 30/12/2015 16:27:09:
dit is de php code
Code (php)
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
<?PHP
$tmp = "";
$dbhost = 'xxxx';
$dbuser = 'xxxx';
$dbpass = 'xxxx';
$dbname = 'xxxx';
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');
mysql_select_db($dbname);
$query = "SELECT * FROM alarmeringen ORDER BY timestamp DESC LIMIT 100";
$result = mysql_query($query);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>p2000 monitor bussenentreinenforum.nl</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Cache-Control" content="max-age=3600" />
<meta name="description" content="p2Kflex - Online p2000 meldingen volgen van de hulpdiensten" />
<meta name="keywords" content="p2kflex, FrankiePlankie, supportp2kflex, p2000, monitor, Persinfo, Grip, VOS, VOR, GEA, TIS, VIS, Incidentmeldingen, Veiligheidsregio" />
<meta name="google-site-verification" content="_LmuZ5TTYBjh4XmwcQIy435rVPloxBgVumbQ1-S2jtI" />
<meta name="robots" content="index, nofollow" />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<link rel="apple-touch-icon" href="apple-touch-icon.png" />
<link rel="apple-touch-icon" sizes="72x72" href="apple-touch-icon.png" />
<link rel="apple-touch-icon" sizes="114x114" href="apple-touch-icon.png" />
<link rel="apple-touch-icon" sizes="144x144" href="apple-touch-icon.png" />
<link rel="stylesheet" href="p2KflexM.css" type="text/css" />
<meta http-equiv="refresh" content="15" />
<script type="text/javascript" src="script/soundmanager2-nodebug-jsmin.js"></script>
<script type="text/javascript">
soundManager.setup({
useFlashBlock: false,
url: "swf/",
debugMode: false,
consoleOnly: false
});
</script><body text="#00FFFF" bgcolor="#000000" link="#33CCFF" vlink="#00FFFF" alink="#00FFFF">
<div id="p2ktooltip"></div>
<script type="text/javascript">
//<![CDATA[
var offsetxpoint=-60
var offsetypoint=20
var ie=document.all
var ns6=document.getElementById && !document.all
var enabletip=false
if (ie||ns6)
var tipobj=document.all? document.all["p2ktooltip"] : document.getElementById? document.getElementById("p2ktooltip") : ""
function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}
function p2ktip(thetext, thecolor, thewidth){
if (ns6||ie){
if (typeof thewidth!="undefined") tipobj.style.width=thewidth+"px"
if (typeof thecolor!="undefined" && thecolor!="") tipobj.style.backgroundColor=thecolor
tipobj.innerHTML = thetext
enabletip=true
return false
}
}
function positiontip(e){
if (enabletip){
var curX=(ns6)?e.pageX : event.clientX+ietruebody().scrollLeft;
var curY=(ns6)?e.pageY : event.clientY+ietruebody().scrollTop;
var rightedge=ie&&!window.opera? ietruebody().clientWidth-event.clientX-offsetxpoint : window.innerWidth-e.clientX-offsetxpoint-20
var bottomedge=ie&&!window.opera? ietruebody().clientHeight-event.clientY-offsetypoint : window.innerHeight-e.clientY-offsetypoint-20
var leftedge=(offsetxpoint<0)? offsetxpoint*(-1) : -1000
if (rightedge<tipobj.offsetWidth)
tipobj.style.left=ie? ietruebody().scrollLeft+event.clientX-tipobj.offsetWidth+"px" : window.pageXOffset+e.clientX-tipobj.offsetWidth+"px"
else if (curX<leftedge)
tipobj.style.left="5px"
else
tipobj.style.left=curX+offsetxpoint+"px"
if (bottomedge<tipobj.offsetHeight)
tipobj.style.top=ie? ietruebody().scrollTop+event.clientY-tipobj.offsetHeight-offsetypoint+"px" : window.pageYOffset+e.clientY-tipobj.offsetHeight-offsetypoint+"px"
else
tipobj.style.top=curY+offsetypoint+"px"
tipobj.style.visibility="visible"
}
}
function hidep2ktip(){
if (ns6||ie){
enabletip=false
tipobj.style.visibility="hidden"
tipobj.style.left="-1000px"
tipobj.style.backgroundColor=""
tipobj.style.width=""
}
}
function ShowMap(data)
{
var url = 'http://maps.google.nl/maps?f=q&hl=nl&geocode=&q=' + data;
window.open(url);
}
document.onmousemove=positiontip
var Regio = "0";
var Sound = "0";
var Sid = "vubn0v0vte3lfr3ub3862850g0";
var HtmlData = new Array();
var SysError = 0; var UpdTmr = 1; var Status = ""; Id = 0;
var adblock = true;
function Load()
{
Refresh(1);
}
function Refresh(flag)
{
if (document.referrer.indexOf("cloudapp.net") == -1) {
UpdTmr = UpdTmr - 1;
if (UpdTmr == 0) ProcesshttpPost(flag,Regio);
if (UpdTmr < -(15 * SysError)) UpdTmr = 15;
setTimeout('Refresh(0)',1000);
} else {
window.location = "403.html"
}
}
function ProcesshttpPost(flag, newregio)
{
if (flag == 1) {
document.getElementById('ad1_inline').appendChild(document.getElementById('ad1_footer'));
document.getElementById('ad1_footer').style.display = '';
if (Sound == 0) {
document.getElementById("audioimg").src = "images/audio_off.png";
}
}
if (Regio != newregio) {
Regio = newregio;
HtmlData = [];
window.scrollTo(0, 0);
Id = 0;
}
xmlhttpPost("engine.php?id=" + Id + "&debug=" + Status + "®io=" + Regio + "&sid=" + Sid + "&date=" + new Date());
}
function xmlhttpPost(strURL) {
var xhr; var msg = "";
Status = "";
if (window.XMLHttpRequest) { // Mozilla/Safari
xhr = new XMLHttpRequest();
} else if (window.ActiveXObject) { // IE
xhr = new ActiveXObject("Microsoft.XMLHTTP");
}
xhr.open('GET', strURL, true);
xhr.timeout = 10000;
xhr.onreadystatechange = function() {
if (this.readyState == 4) {
if (this.status == 200) {
UpdTmr = 15;
SysError = 0;
document.getElementById("servererror").style.visibility = "hidden";
ProcessData(this.responseText);
} else {
SysError = SysError + 1;
msg = "XMLHttpRequest Status Error (" + this.status + ")";
}
} else if (this.readyState == 0) {
SysError = SysError + 1;
msg = "XMLHttpRequest ReadyState Error (" + this.readyState + ")";
} else {
msg = "XMLHttpRequest ReadyState Error (" + this.readyState + ")";
}
if (SysError > 3) {
Status = this.readyState + '-' + this.status + '-' + SysError;
ShowError(msg);
}
if (SysError > 30) SysError = 30;
};
xhr.send(null);
}
function ProcessData(ReceivedData) {
var tmp = "";
var i = 0;
if (ReceivedData.length > 0) {
var data = new Array;
data = ReceivedData.split('<SplitonThis>');
if (data.length > 3)
{
document.getElementById("phptime").innerHTML = 'Database query : ' + data[2] + ' seconds';
if (data[3] != "0")
{
document.getElementById("usercount").innerHTML = data[3];
}
if (data.length == 5)
{
document.getElementById("sysmessage").innerHTML = data[4];
document.getElementById("sysmessage").style.visibility = "visible";
}
else
{
document.getElementById("sysmessage").style.visibility = "hidden";
}
if (Id < data[1] && Id > 0)
{
if (Sound == 1)
{
PlaySound();
}
}
Id = data[1];
if (data[0] != "") {
data.splice(1, data.length - 1);
if (HtmlData.length > 0)
{
data = data.concat(HtmlData);
}
HtmlData = data;
if (HtmlData.length > 500)
{
HtmlData.splice(500, HtmlData.length - 500);
}
for (i = 0; i < HtmlData.length; i++)
{
tmp = tmp + HtmlData[i];
}
document.getElementById("result").innerHTML = "<table>" + tmp + "</table>";
}
}
}
}
function ToggleSound()
{
if (Sound == 1) {
document.getElementById("audioimg").src = "images/audio_off.png";
Sound = 0;
} else {
document.getElementById("audioimg").src = "images/audio_on.png";
Sound = 1;
}
}
function PlaySound(audio)
{
var mySound = soundManager.createSound({url: 'sound/beep-7.mp3' , volume: 100});
mySound.play();
}
//]]>
</script>
<body>
<table>
<tbody>
<?php
while($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
if ($tmp != $row['melding'])
{
if ($tmp != "")
{
echo "<tr><td colspan=3><HR></td></tr>";
}
$tmp = $row['melding'];
preg_match('/[A-Z]+.[0-9]+.[0-9]{4}[A-Z]{2}.:.[A-Z]+/',$row['melding'],$matches);
if (count($matches) != 0)
{
$data = explode(' ',str_replace(':','',$matches[0]));
$straat = $data[0];
$stad = $data[4];
}
$output = str_replace($matches[0],'<a href ="http://maps.google.nl/maps?f=q&hl=nl&geocode=&q='.$straat.'%20'.$stad.'">'.$matches[0].'</a>',$row['melding']);
echo '<tr><td class="COL2">' . $row['timestamp'] . '</td><td class="COL4">' . $row['type'] . '</td><td class="COL7G">' . $row['melding'] . '</td></tr>';
}
echo '<tr><tr><td class="COL2"></td><td class="COL1">' . $row['capcode'] . '</td></td><td class="c01">' . $row['label'] . '</td></tr>';
}
?>
</table>
</tbody>
</body>
</html>
<?php
mysql_close($conn);
?>
$tmp = "";
$dbhost = 'xxxx';
$dbuser = 'xxxx';
$dbpass = 'xxxx';
$dbname = 'xxxx';
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');
mysql_select_db($dbname);
$query = "SELECT * FROM alarmeringen ORDER BY timestamp DESC LIMIT 100";
$result = mysql_query($query);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>p2000 monitor bussenentreinenforum.nl</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Cache-Control" content="max-age=3600" />
<meta name="description" content="p2Kflex - Online p2000 meldingen volgen van de hulpdiensten" />
<meta name="keywords" content="p2kflex, FrankiePlankie, supportp2kflex, p2000, monitor, Persinfo, Grip, VOS, VOR, GEA, TIS, VIS, Incidentmeldingen, Veiligheidsregio" />
<meta name="google-site-verification" content="_LmuZ5TTYBjh4XmwcQIy435rVPloxBgVumbQ1-S2jtI" />
<meta name="robots" content="index, nofollow" />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<link rel="apple-touch-icon" href="apple-touch-icon.png" />
<link rel="apple-touch-icon" sizes="72x72" href="apple-touch-icon.png" />
<link rel="apple-touch-icon" sizes="114x114" href="apple-touch-icon.png" />
<link rel="apple-touch-icon" sizes="144x144" href="apple-touch-icon.png" />
<link rel="stylesheet" href="p2KflexM.css" type="text/css" />
<meta http-equiv="refresh" content="15" />
<script type="text/javascript" src="script/soundmanager2-nodebug-jsmin.js"></script>
<script type="text/javascript">
soundManager.setup({
useFlashBlock: false,
url: "swf/",
debugMode: false,
consoleOnly: false
});
</script><body text="#00FFFF" bgcolor="#000000" link="#33CCFF" vlink="#00FFFF" alink="#00FFFF">
<div id="p2ktooltip"></div>
<script type="text/javascript">
//<![CDATA[
var offsetxpoint=-60
var offsetypoint=20
var ie=document.all
var ns6=document.getElementById && !document.all
var enabletip=false
if (ie||ns6)
var tipobj=document.all? document.all["p2ktooltip"] : document.getElementById? document.getElementById("p2ktooltip") : ""
function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}
function p2ktip(thetext, thecolor, thewidth){
if (ns6||ie){
if (typeof thewidth!="undefined") tipobj.style.width=thewidth+"px"
if (typeof thecolor!="undefined" && thecolor!="") tipobj.style.backgroundColor=thecolor
tipobj.innerHTML = thetext
enabletip=true
return false
}
}
function positiontip(e){
if (enabletip){
var curX=(ns6)?e.pageX : event.clientX+ietruebody().scrollLeft;
var curY=(ns6)?e.pageY : event.clientY+ietruebody().scrollTop;
var rightedge=ie&&!window.opera? ietruebody().clientWidth-event.clientX-offsetxpoint : window.innerWidth-e.clientX-offsetxpoint-20
var bottomedge=ie&&!window.opera? ietruebody().clientHeight-event.clientY-offsetypoint : window.innerHeight-e.clientY-offsetypoint-20
var leftedge=(offsetxpoint<0)? offsetxpoint*(-1) : -1000
if (rightedge<tipobj.offsetWidth)
tipobj.style.left=ie? ietruebody().scrollLeft+event.clientX-tipobj.offsetWidth+"px" : window.pageXOffset+e.clientX-tipobj.offsetWidth+"px"
else if (curX<leftedge)
tipobj.style.left="5px"
else
tipobj.style.left=curX+offsetxpoint+"px"
if (bottomedge<tipobj.offsetHeight)
tipobj.style.top=ie? ietruebody().scrollTop+event.clientY-tipobj.offsetHeight-offsetypoint+"px" : window.pageYOffset+e.clientY-tipobj.offsetHeight-offsetypoint+"px"
else
tipobj.style.top=curY+offsetypoint+"px"
tipobj.style.visibility="visible"
}
}
function hidep2ktip(){
if (ns6||ie){
enabletip=false
tipobj.style.visibility="hidden"
tipobj.style.left="-1000px"
tipobj.style.backgroundColor=""
tipobj.style.width=""
}
}
function ShowMap(data)
{
var url = 'http://maps.google.nl/maps?f=q&hl=nl&geocode=&q=' + data;
window.open(url);
}
document.onmousemove=positiontip
var Regio = "0";
var Sound = "0";
var Sid = "vubn0v0vte3lfr3ub3862850g0";
var HtmlData = new Array();
var SysError = 0; var UpdTmr = 1; var Status = ""; Id = 0;
var adblock = true;
function Load()
{
Refresh(1);
}
function Refresh(flag)
{
if (document.referrer.indexOf("cloudapp.net") == -1) {
UpdTmr = UpdTmr - 1;
if (UpdTmr == 0) ProcesshttpPost(flag,Regio);
if (UpdTmr < -(15 * SysError)) UpdTmr = 15;
setTimeout('Refresh(0)',1000);
} else {
window.location = "403.html"
}
}
function ProcesshttpPost(flag, newregio)
{
if (flag == 1) {
document.getElementById('ad1_inline').appendChild(document.getElementById('ad1_footer'));
document.getElementById('ad1_footer').style.display = '';
if (Sound == 0) {
document.getElementById("audioimg").src = "images/audio_off.png";
}
}
if (Regio != newregio) {
Regio = newregio;
HtmlData = [];
window.scrollTo(0, 0);
Id = 0;
}
xmlhttpPost("engine.php?id=" + Id + "&debug=" + Status + "®io=" + Regio + "&sid=" + Sid + "&date=" + new Date());
}
function xmlhttpPost(strURL) {
var xhr; var msg = "";
Status = "";
if (window.XMLHttpRequest) { // Mozilla/Safari
xhr = new XMLHttpRequest();
} else if (window.ActiveXObject) { // IE
xhr = new ActiveXObject("Microsoft.XMLHTTP");
}
xhr.open('GET', strURL, true);
xhr.timeout = 10000;
xhr.onreadystatechange = function() {
if (this.readyState == 4) {
if (this.status == 200) {
UpdTmr = 15;
SysError = 0;
document.getElementById("servererror").style.visibility = "hidden";
ProcessData(this.responseText);
} else {
SysError = SysError + 1;
msg = "XMLHttpRequest Status Error (" + this.status + ")";
}
} else if (this.readyState == 0) {
SysError = SysError + 1;
msg = "XMLHttpRequest ReadyState Error (" + this.readyState + ")";
} else {
msg = "XMLHttpRequest ReadyState Error (" + this.readyState + ")";
}
if (SysError > 3) {
Status = this.readyState + '-' + this.status + '-' + SysError;
ShowError(msg);
}
if (SysError > 30) SysError = 30;
};
xhr.send(null);
}
function ProcessData(ReceivedData) {
var tmp = "";
var i = 0;
if (ReceivedData.length > 0) {
var data = new Array;
data = ReceivedData.split('<SplitonThis>');
if (data.length > 3)
{
document.getElementById("phptime").innerHTML = 'Database query : ' + data[2] + ' seconds';
if (data[3] != "0")
{
document.getElementById("usercount").innerHTML = data[3];
}
if (data.length == 5)
{
document.getElementById("sysmessage").innerHTML = data[4];
document.getElementById("sysmessage").style.visibility = "visible";
}
else
{
document.getElementById("sysmessage").style.visibility = "hidden";
}
if (Id < data[1] && Id > 0)
{
if (Sound == 1)
{
PlaySound();
}
}
Id = data[1];
if (data[0] != "") {
data.splice(1, data.length - 1);
if (HtmlData.length > 0)
{
data = data.concat(HtmlData);
}
HtmlData = data;
if (HtmlData.length > 500)
{
HtmlData.splice(500, HtmlData.length - 500);
}
for (i = 0; i < HtmlData.length; i++)
{
tmp = tmp + HtmlData[i];
}
document.getElementById("result").innerHTML = "<table>" + tmp + "</table>";
}
}
}
}
function ToggleSound()
{
if (Sound == 1) {
document.getElementById("audioimg").src = "images/audio_off.png";
Sound = 0;
} else {
document.getElementById("audioimg").src = "images/audio_on.png";
Sound = 1;
}
}
function PlaySound(audio)
{
var mySound = soundManager.createSound({url: 'sound/beep-7.mp3' , volume: 100});
mySound.play();
}
//]]>
</script>
<body>
<table>
<tbody>
<?php
while($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
if ($tmp != $row['melding'])
{
if ($tmp != "")
{
echo "<tr><td colspan=3><HR></td></tr>";
}
$tmp = $row['melding'];
preg_match('/[A-Z]+.[0-9]+.[0-9]{4}[A-Z]{2}.:.[A-Z]+/',$row['melding'],$matches);
if (count($matches) != 0)
{
$data = explode(' ',str_replace(':','',$matches[0]));
$straat = $data[0];
$stad = $data[4];
}
$output = str_replace($matches[0],'<a href ="http://maps.google.nl/maps?f=q&hl=nl&geocode=&q='.$straat.'%20'.$stad.'">'.$matches[0].'</a>',$row['melding']);
echo '<tr><td class="COL2">' . $row['timestamp'] . '</td><td class="COL4">' . $row['type'] . '</td><td class="COL7G">' . $row['melding'] . '</td></tr>';
}
echo '<tr><tr><td class="COL2"></td><td class="COL1">' . $row['capcode'] . '</td></td><td class="c01">' . $row['label'] . '</td></tr>';
}
?>
</table>
</tbody>
</body>
</html>
<?php
mysql_close($conn);
?>
Gewijzigd op 30/12/2015 17:21:20 door - Ariën -
Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/bussen1b/public_html/p2000.php on line 10
1 regel was wel genoeg.
Notice: Undefined offset: 0 in /home/bussen1b/public_html/p2000.php on line 266
$matches[0] bestaat blijkbaar niet.
$output = str_replace($matches[0],'<a href ="http://maps.google.nl/maps?f=q&hl=nl&geocode=&q='.$straat.'%20'.$stad.'">'.$matches[0].'</a>',$row['melding']);
dat snap ik maar ik heb ook een sql bestand van googlemaps hoe moet ik dat dan doen.
Het gaat over PHP. Dus je SQL-structuur kan je zo laten zoals het is.
Maar hoe moet ik dan de straat en stad dan laten zien in de melding
Misschien handig om eerst maar eens wat te proberen, en te ontdekken wat er gebeurt? ;)
Dan gebeurt er niks ik heb het meerdere keren al geprobeerd maar dat lukte toen niet.
Als er 'niets' gebeurt, dan zal je wel wat anders vitaals stuk gemaakt hebben in je script.
http://bussenentreinenforum.nl/p2000.php en dit is van iemand anders http://www.p2kflex.frankieplankie.nl/ want bij die gene kan je het adres wel aanklikken en mij mij niet en ik vraag me af hoe je een mouse-over maakt voor alle dingen te laten zien zo als bij die gene.
dit is mijn site Zal wel iets zijn die het adres in een link naar Google maakt.
https://developers.google.com/maps/articles/phpsqlajax_v3 hoe ik dat moet doen.
Maar is er ook een manier om dit te doen met sql http://php.net/manual/en/book.mysqli.php. Ik doel dan op het gebruik van mysql/php voor google maps.
Dan verander je alle mysql() functies toch naar mysqli, mocht je niet weten hoe mysqli werkt, dan vind je hier alle info: DavY - op 30/12/2015 17:46:35:
Dan verander je alle mysql() functies toch naar mysqli, mocht je niet weten hoe mysqli werkt, dan vind je hier alle info: http://php.net/manual/en/book.mysqli.php. Ik doel dan op het gebruik van mysql/php voor google maps.
Zo als wat dan en hoe.
De functies aanpassen, zie die link.
de link doet het niet
Punt op het eind weghalen.
David Meijer op 30/12/2015 18:04:24:
de link doet het niet
Punt op het eind van de url weghalen.
Edit: Oh, Arien was me al voor.
Gewijzigd op 30/12/2015 18:06:26 door DavY -
De vorige keer toen ik van mysql naar mysqli ging deed de hele php site het niet
Dat wijst erop dat je dus iets niet goed gedaan hebt, maar men zou je dus beter kunnen helpen, als je foutmeldingen hier zet, want dat spreekt al voor zich.
Toevoeging op 30/12/2015 18:23:37:
Welke code was het ook al weer om de errors te laten zien.
Gewijzigd op 30/12/2015 18:25:26 door David Meijer
David, wat heb je al geprobeerd met Google? Eigen inzet en motivatie verwachten we graag.