Toon posts:

[PHP]Comunicatie

Pagina: 1
Acties:

Verwijderd

Topicstarter
Ik wil graag een communiceren tussen twee bestanden, maar het lukt nog niet erg...
Ik heb bestand: "Wardata2.php" en "Results.php"

Je kan Wardata2.php hier bekijken: http://upclan.gamepoint.net/Wardata2.php

Ik zou dus willen dat als de user "Dodger" voor Yes kiest, dat dan achter zijn naam in het bestand "Results.php" 'Yes 'komt te staan.

Ik heb al 4 verschillende communicaties geprobeerd, maar geen van allen lukte. Daarom zal ik dit onderdeel weglaten.
Mijn vraag is dus of iemand zo aardig wil zijn om voor één user dit communicatie systeem te maken >:)
Dus als Dodger voor YES kiest, dat dan in het bestand "Result" achter zijn variabele (naam) het woord YES komt te staan. De values zijn al aangemaakt :)


De code van "Results.php" is:
code:
1
2
3
4
5
6
7
<?php 
$Dodger =  "Onzeker"; 
$Grumpz = "Onzeker"; 
$ZanZarah = "Onzeker"; 
$Orion = "Onzeker"; 
$B2K = "Onzeker"; 
?>

De code van "Wardata2.php" is:
code:
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
<html>
<head>
<META HTTP-EQUIV="content-type" CONTENT="text/html; charset=ISO-8859-1"><style><!--
body,td,a,p,.h{font-family:arial,sans-serif;} .h{font-size: 20px;} .h{color:} .q{text-decoration:none; color:#000080;}
//--></style>
<title>Wardata</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body border="1" background="images/background_white_blur.jpg" text="#000000" style="border-collapse: collapse; border-left-width: 0; border-right-width: 0; border-top-width: 0" bordercolor="#111111">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
  <tr>
    <td width="90%">
    <div align="center"> 
      <p align="center"><font color="#000000"><b>Avaible or not? Please, sign 
        up :-)<br>
        Give your nickname and let us know if you are avaible or not</b></font></p>
</div>
    <td width="10%">
    <div align="right">[img]"images/Medic2.JPG"[/img]</div>
    </td>
    </tr>
</table>

<div align="center"><br>
  <font size="4">COW</font></div>
<FORM ACTION="mailto:nRx_clan@hotmail.com?subject=Wardata COW" METHOD="POST" ENCTYPE="text/plain">
  <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; border-width: 0" bordercolor="#111111" width="461" id="AutoNumber1" align="center">
    <tr> 
    <td valign="top" height="30" style="border-style: none; border-width: medium" colspan="2"><font color="#000000">Nick 
      Name</font></td>
    <td valign="top" width="136" style="border-style: none; border-width: medium"> 
      <input type="text" name="NickName" value="[nRx]">
    </td>
    </tr>
    <tr> 
    <td valign="top" height="30" style="border-style: none; border-width: medium" colspan="2"><font color="#000000">War 
      versus </font></td>
    <td valign="top" width="136" style="border-style: none; border-width: medium"> 
      <input type="text" name="War vs" value="COW">
    </td>
    </tr>
    <tr> 
    <td valign="top" height="30" style="border-style: none; border-width: medium" colspan="2"><font color="#000000">Date</font></td>
    <td valign="top" width="136" style="border-style: none; border-width: medium"> 
      <input type="text" name="Date" value="13 May 2002">
    </td>
    </tr>
    <tr> 
    <td height="30" width="164" valign="top" style="border-style: none; border-width: medium"><font color="#000000">Avaible</font></td>
    <td valign="top" width="161">Dodger</td>
    <td valign="top" style="border-style: none; border-width: medium"> Yes 
      <input type="radio" name="Avaible" value="DogerYes">
      No 
      <input type="radio" name="Not Avaible" value="DodgerNot">
    </td>
    </tr>
    <tr> 
    <td height="30" width="164" valign="top" style="border-style: none; border-width: medium"><font color="#000000">Avaible</font></td>
    <td valign="top" width="161">Grumpz</td>
    <td valign="top" style="border-style: none; border-width: medium"> Yes 
      <input type="radio" name="Avaible" value="GrumpzYes">
      No 
      <input type="radio" name="Not Avaible" value="GrumpzNot">
    </td>
    </tr>
    <tr> 
    <td height="30" width="164" valign="top" style="border-style: none; border-width: medium"><font color="#000000">Avaible</font></td>
    <td valign="top" width="161">ZanZarah</td>
    <td valign="top" style="border-style: none; border-width: medium"> Yes 
      <input type="radio" name="Avaible" value="ZanZarahYes">
      No 
      <input type="radio" name="Not Avaible" value="ZanZarahNot">
    </td>
    </tr>
    <tr> 
    <td height="30" width="164" valign="top" style="border-style: none; border-width: medium"><font color="#000000">Avaible</font></td>
    <td valign="top" width="161">Orion</td>
    <td valign="top" style="border-style: none; border-width: medium"> Yes 
      <input type="radio" name="Avaible" value="OrionYes">
      No 
      <input type="radio" name="Not Avaible" value="OrionNot">
    </td>
    </tr>
    <tr> 
    <td height="30" width="164" valign="top" style="border-style: none; border-width: medium"><font color="#000000">Avaible</font></td>
    <td valign="top" width="161">B2K</td>
    <td valign="top" style="border-style: none; border-width: medium"> Yes 
      <input type="radio" name="Avaible" value="B2KYes">
      No 
      <input type="radio" name="Not Avaible" value="B2KNot">
    </td>
    </tr>
    <tr> 
    <td height="30" colspan="3" valign="top" align="center"> 
      <div align="center"> 
        <input type="submit" value="Ok">
        <input type="reset" name="Submit2" value="Reset">
      </div>
    </td>
    </tr>
  </table>
</form>
</body>
</html>

wie kan deed n00b helpen?
Het moet volgens mij heel simpel zijn... :?

  • goalgetter
  • Registratie: Juni 1999
  • Laatst online: 25-08 15:24
Hint : open die results.php en doe een str_replace

Verwijderd

print_r($_POST);

Zet dat eens in result.php en probeer dan verder...

Verwijderd

dreamweaver? :)

Verwijderd

Op dinsdag 07 mei 2002 12:54 schreef ferenc het volgende:
dreamweaver? :)
:?

Verwijderd

Topicstarter
Ik bedoel dat het wordt opgeslagen in results. Daarna kan je heel makkelijk de site maken, natuurlijk. Alleen ik begrijp maar niet hoe je de variabele in Results kan veranderen :?
En ik gebruik dreamweaver, jah >:)


Ik zal het ff uitleggen met een simpel voorbeeldje, hoe ik het in gedachten had :)

Dit is de form:
<form action="nextpage.php" method="POST">
<input type="text" name="YYY">
<input type="submit" name="submit" value="Submit">
</form>

Wanneer je op submit druk, worden de values doorgegeven aan nextpage.php.

Daarna was ik de weg al kwijt :p
Ik heb dit gevonden:
"Then you simply retrieve them through the use of either:

$HTTP_POST_VARS['YYY'] for versions < 4.1.x
$_SERVER['YYY'] for versions >= 4.1.x

Note the "YYY" is the name of the form's field, in it you will obviously find the value of that field. "

Snap niet helemaal hoe ik dit moet gebruiken/waar te plaatsen :)
I'm sure you do :)

Verwijderd

$_POST['YYY']

Verwijderd

ÉN is het natuurlijk comMunicatie...
Pagina: 1