PDA

View Full Version : registration table


kidrapoizzz
03-22-2007, 08:05 PM
i am very sorry for my english. i am a estonian peaple.
i am makind a wrb page for my family "Beauty & health center"


can some one make a not hard script.


i explane how its works:
almost like "Part 9 - Inserting data with PHP (http://www.dreamweaverclub.com/vtm/)" (that is the video tutorial)
buy not with database.

network registration the you dont have to call or go in there.
there is 4 columns (data1=nimi, data2=telefoni nr, data3=kaua oled, data4=millal
just some one put his/her name where he/she want to go and time .
i hope itīs not trouble. :) :lol:

more information by my msn:kidrapoizz@hotmail.com

davidj
03-22-2007, 08:29 PM
you need a database to build a booking system

its the only way to do this really

I dont think anyone will do this for you for free

kidrapoizzz
03-22-2007, 08:31 PM
ok never mind

davidj
03-22-2007, 08:32 PM
didnt you follow the video tutorials

kidrapoizzz
03-22-2007, 08:40 PM
my test server dont work.
i did everythink just like you said and showed.
and i have script.
its not work

davidj
03-22-2007, 08:49 PM
try again

make sure you follow every point carefully

kidrapoizzz
03-22-2007, 08:51 PM
i watch allready three times

kidrapoizzz
03-22-2007, 08:51 PM
but your require_once in blue not green and other things too.

davidj
03-22-2007, 08:52 PM
post the code

kidrapoizzz
03-23-2007, 10:11 AM
here it is:


<?php
require_once("connections/connection.php"); // database connection
/////////////////////////////////////////////////
$data2 = $_POST["data2"];
$data3 = $_POST["data3"];
$data4 = $_POST["data4"];
$submit = $_POST["submit"];
/////////////////////////////////////////////////
if ($submit && $data2 && $data3 && $data4)(
////////////////////////////////////////////////
$query = sprintf("INSERT into tabel (field2, field3, field4) values ($data2, $data3, $data4)");
mysql_query($query)or die(mysql_error());
////////////////////////////////////////////////
)elseif($submit)(
echo "One of your fields is empty !";
)
////////////////////////////////////////////////
$query =sprintf("SELECT * FORM table1");
$result =@mysql_query($query);
$row =mysql_fetch_array($result);
////////////////////////////////////////////////

/*do (
echo $row["field2"],"<br>"; */

?>

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<table width="457" border="1">
<tr>
<td>data2</td>
<td>data3</td>
<td>data4</td>
</tr>
<tr>
<td><input type="text" name="textfield"></td>
<td><input type="text" name="textfield2"></td>
<td><input type="text" name="textfield3"></td>
</tr>
<tr>
<td height="38" colspan="3"><div align="center">
<input type="submit" name="Submit" value="Submit">
<input name="submit" type="hidden" id="submit" value="1">
</div></td>
</tr>
</table>
<p>&nbsp;</p>
<table width="424" height="56" border="1">
<tr>
<td width="23">ID</td>
<td width="138">data2</td>
<td width="138">data3</td>
<td width="138">data4</td>
</tr>
<?php do ( ?>

<tr>
<td height="25"><?php echo $row["field1_id"] ?></td>
<td><?php echo $row["field2"];?></td>
<td><?php echo $row["field3"];?></td>
<td><?php echo $row["field4"];?></td>
</tr>
<?php )while ($row = mysql_fetch_array($result)); ?>

</table>
</body>
</html>




one thing more i cant make thees things ' to here i copi it buy in php program i can not make it. can you help how i make it and whats wrong with code.

davidj
03-23-2007, 10:27 AM
in your web root you need to create a page called phpinfo.php

in the page remove all HTML and add <?php phpinfo(); ?>

Now run the page in the browser through your LocalHost

example...

http://localhost/phpinfo.php

then you need to tell me what you see

kidrapoizzz
03-23-2007, 11:00 AM
its show this
Not Found

The requested URL /Test/TMP22ylbfcrup.php was not found on this server.


and look the address localhost/Test/TMP22ylbfcrup.php
i save script as dwc.php

did you understood?
or i need to explain more?

davidj
03-23-2007, 11:08 AM
your root path is set incorrectly

where did you save the file too?

this has to match where your root dir is..

open your browser and type..

http://localhost/

what appears?

davidj
03-23-2007, 11:10 AM
oh

and you are pressing F12 to display your pages...

TMP22ylbfcrup.php << this is a temp file created by Dreamweaver

please navigate to the files manually until you have this working

kidrapoizzz
03-23-2007, 02:10 PM
in http://localhost/ i see wamp5 staff

kidrapoizzz
03-23-2007, 02:18 PM
http://localhost/phpinfo.php

then you need to tell me what you see

in this i see

Not Found

The requested URL /phpinfo.php was not found on this server.

davidj
03-23-2007, 02:26 PM
this is happening because phpinfo.php is not in your web root

you need to find out where your web root is.

click the icon in your systems tray that is your wamp5 app

you should see a www root option

click that

this will open up a directory

you need to save your php files to that directory

kidrapoizzz
03-23-2007, 06:01 PM
do i understand right i need to make www directory to web root.

now it is this C:\wamp\www

davidj
03-24-2007, 02:16 PM
ok now save phpinfo.php to that directory and run http://localhost/phpinfo.php
from your browser

you will work from that directory from now on

kidrapoizzz
03-24-2007, 07:29 PM
it shows this
Not Found

The requested URL /phpinfo.php was not found on this server.

davidj
03-24-2007, 07:32 PM
and you saved the file to..

C:\wamp\www

davidj
03-24-2007, 07:36 PM
open the directory where you saved the phpinfo.php file and paste the path from the address bar in here