Php van 1 pag. naar 2pagina's
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
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
<?
include"config.php";
if($submit) {
$select = "SELECT * FROM partners WHERE sitenaam='$sitenaam'";
$query = mysql_query($select)or die(mysql_error());
if ($naam =="" || $email =="" || $sitenaam =="" || $siteurl =="") {
echo "<font color=#FF0000;>Fout: Je moet alles invullen.</font> <a href='javascript:history.go(-1);'>Terug</a>";
}
else {
$insert = "INSERT INTO partners (naam,email,sitenaam,siteurl,inhits,uithits) VALUES ('$naam','$email','$sitenaam','$siteurl','0','0')";
$query = mysql_query($insert)or die(mysql_error());
$query = "SELECT * FROM partners WHERE naam='$naam'";
$result = mysql_query($query);
while ($list = mysql_fetch_object($result)) {
$id = $list->id;
}
echo "Bedankt... Je website staat nu op de<br><br>Links Pagina.<br><br>";
}
}
else {
?>
<form name="form1" method="post" action="aanmelden.php">
<table width="283" border="0">
<tr>
<td height="24" colspan="2" bgcolor="#97335A"><font color="#FFFFFF"><b> Betaalde Linkex:</b></font></td>
</tr>
<tr>
<td width="37%">Naam</td>
<td width="65%">
<input type="text" name="naam">
</td>
</tr>
<tr>
<td width="37%">Email</td>
<td width="65%">
<input type="text" name="email">
</td>
</tr>
<tr>
<td width="37%">Titel Site</td>
<td width="65%">
<input type="text" name="sitenaam" maxlength="15">
</td>
</tr>
<tr>
<td width="37%">Site url</td>
<td width="65%">
<input type="text" name="siteurl" value="http://">
</td>
</tr>
<tr>
<td colspan="2">
<input type="submit" name="submit" value="ok">
</td>
</tr>
</table>
</form>
<?
}
?>
include"config.php";
if($submit) {
$select = "SELECT * FROM partners WHERE sitenaam='$sitenaam'";
$query = mysql_query($select)or die(mysql_error());
if ($naam =="" || $email =="" || $sitenaam =="" || $siteurl =="") {
echo "<font color=#FF0000;>Fout: Je moet alles invullen.</font> <a href='javascript:history.go(-1);'>Terug</a>";
}
else {
$insert = "INSERT INTO partners (naam,email,sitenaam,siteurl,inhits,uithits) VALUES ('$naam','$email','$sitenaam','$siteurl','0','0')";
$query = mysql_query($insert)or die(mysql_error());
$query = "SELECT * FROM partners WHERE naam='$naam'";
$result = mysql_query($query);
while ($list = mysql_fetch_object($result)) {
$id = $list->id;
}
echo "Bedankt... Je website staat nu op de<br><br>Links Pagina.<br><br>";
}
}
else {
?>
<form name="form1" method="post" action="aanmelden.php">
<table width="283" border="0">
<tr>
<td height="24" colspan="2" bgcolor="#97335A"><font color="#FFFFFF"><b> Betaalde Linkex:</b></font></td>
</tr>
<tr>
<td width="37%">Naam</td>
<td width="65%">
<input type="text" name="naam">
</td>
</tr>
<tr>
<td width="37%">Email</td>
<td width="65%">
<input type="text" name="email">
</td>
</tr>
<tr>
<td width="37%">Titel Site</td>
<td width="65%">
<input type="text" name="sitenaam" maxlength="15">
</td>
</tr>
<tr>
<td width="37%">Site url</td>
<td width="65%">
<input type="text" name="siteurl" value="http://">
</td>
</tr>
<tr>
<td colspan="2">
<input type="submit" name="submit" value="ok">
</td>
</tr>
</table>
</form>
<?
}
?>
- Form: "hidden"
Door naar een andere php pagina te posten :)?
Gewijzigd op 01/01/1970 01:00:00 door Baken
ok thx, bedankt in ieder geval (Y)
Code (php)
1
2
3
4
5
6
2
3
4
5
6
<?php
$query = "SELECT * FROM partners WHERE naam='$naam'";
$result = mysql_query($query);
while ($list = mysql_fetch_object($result)) {
$id = $list->id;
?>
$query = "SELECT * FROM partners WHERE naam='$naam'";
$result = mysql_query($query);
while ($list = mysql_fetch_object($result)) {
$id = $list->id;
?>
volgens mij wil je hier het id hebben van het laatst toegevoegde record? dat kan ook met mysql_insert_id().