PHP Coding
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPHP Coding

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old July 31st, 2002, 01:46 AM
olamide olamide is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Plymouth,IN ,USA
Posts: 19 olamide User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to olamide Send a message via Yahoo to olamide
HTML in PHP script

I am trying to write PHP script that will edit,delete,search,list mysql data base. The script bellow.
I keep getting
Parse error: parse error, unexpected T_STRING in /home/bizhive/public_html/FORMPROCESS1.php3 on line 45
.
Anybody there to help me debug the code?


<?php
$Request=$_REQUEST['form'];
$UserName = $_REQUEST['username'];
$FirstName= $_REQUEST['firstname'];
$middlename = $_REQUEST['middlename'];
$lastname = $_REQUEST['lastname'];
$password=$_REQUEST['password'];
$yourtitle = $_REQUEST['yourtitle'];
$streetaddress = $_REQUEST['streetaddress'];
$streetaddresscontinue = $_REQUEST['streetaddresscontinue'];
$city = $_REQUEST['city'];
$state = $_REQUEST['state'];
$zipcode = $_REQUEST['zipcode'];
$country = $_REQUEST['country'];
$homephone = $_REQUEST['homephone'];
$workphone = $_REQUEST['workphone'];
$fax = $_REQUEST['fax'];
$email = $_REQUEST['email'];
$organisation = $_REQUEST['organisation'];
$maritalstatus = $_REQUEST['maritalstatus'];
$occupation = $_REQUEST['occupation'];
$religion = $_REQUEST['religion'];
$others = $_REQUEST["others"];


$db =mysql_connect ("localhost", "bizhive_database", "pass") or die ('Having problem connecting to the database.');

mysql_select_db ("bizhive_nigeriangreenpage");

switch ($request) {

Case 'search':

mySQLquery("SELECT * From database where username='$username' or firstname='$firstname' or Middlename='$middlename' or lastname='$lastname' or yourtitle='$yourtitle' or streetname=='$streetname' or streenamecontinue='$streetnamecomntinue' or zipcode='$zipcode' or country='$country' or homephone='$homephone' or workphone='$workphone' or fax='$fax' or maritalstatus='$maritalstatus' or occupation='$occupation' or religion='$religion' or homepage='$homephage' or others='$others', $db)
i = 1;
?>;

<html>
<head>
<title>Search Result</title>
</head>

<body bgcolor="#009900" text="#FFFFFF">

<p align="left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;
<marquee width="323" height="19" bgcolor="#009900" style="font-weight: bold">NIGERIANGREENPAGE&nbsp;
DIRECTORY SEARCH RESULT</marquee>
</p>
<table border="1" width="35%">
<tr>
<?PHP

while ($myrow = mySQL_fetch_array($result))
{
?

<td width="100%">SEAECH NUMBER"<?Php echo 'i'?></td>
</tr>
</table>
<table border="1" width="100%">
<tr>
<td width="35%">USER NAME:&nbsp;&nbsp;&nbsp;&nbsp; </td>
<td width="65%">&nbsp;"<?Php echo $myrow['username']?>"</td>
</tr>
<tr>
<td width="35%">FIRST NAME</td>
<td width="65%">"<?Php echo $myrow['firstname']?></td>
</tr>
<tr>
<td width="35%">MIDDLE NAME:</td>
<td width="65%">"<?Php echo $myrow['middlename']?></td>
</tr>
<tr>
<td width="35%">LAST NAME:</td>
<td width="65%">"<?Php echo $myrow['lastname']?></td>
</tr>
<tr>
<td width="35%">TITLE:</td>
<td width="65%">"<?Php echo $myrow['yourtitle']?></td>
</tr>
<tr>
<td width="35%">STREET ADDRESS:</td>
<td width="65%">"<?Php echo $myrow['streetaddress']?></td>
</tr>
<tr>
<td width="35%">STREET ADDRESS CONTINUE:</td>
<td width="65%">"<?Php echo $myrow['streetaddresscontinue']?></td>
</tr>
<tr>
<td width="35%">CITY:</td>
<td width="65%">"<?Php echo $myrow['city']?></td>
</tr>
<tr>
<td width="35%">STATE:</td>
<td width="65%">"<?Php echo $myrow['state']?></td>
</tr>
<tr>
<td width="35%">ZIP CODE:</td>
<td width="65%">"<?Php echo $myrow['zipcode']?></td>
</tr>
<tr>
<td width="35%">COUNTRY:</td>
<td width="65%">"<?Php echo $myrow['country']?></td>
</tr>
<tr>
<td width="35%">HOME PHONE:</td>
<td width="65%">"<?Php echo $myrow['homephone']?></td>
</tr>
<tr>
<td width="35%">WORK PHONE:</td>
<td width="65%">"<?Php echo $myrow['workphone']?></td>
</tr>
<tr>
<td width="35%">FAX:</td>
<td width="65%">"<?Php echo $myrow['fax']?>?</td>
</tr>
<tr>
<td width="35%">E-MAIL:</td>
<td width="65%">"<?Php echo $myrow['email']?></td>
</tr>
<tr>
<td width="35%">ORGANISATION:</td>
<td width="65%">"<?Php echo $myrow['organisation']?></td>
</tr>
<tr>
<td width="35%">MARITAL STATUS:</td>
<td width="65%">"<?Php echo $myrow['maritalstatus']?></td>
</tr>
<tr>
<td width="35%">OCCUPATION:</td>
<td width="65%">"<?Php echo $myrow['occupation']?></td>
</tr>
<tr>
<td width="35%">RELIGION:</td>
<td width="65%">"<?Php echo $myrow['religion']?></td>
</tr>
<tr>
<td width="35%">HOME PAGE:</td>
<td width="65%">"<?Php echo $myrow['homepage']?></td>
</tr>
<tr>
<td width="35%">OTHERS:</td>
<td width="65%">"<?Php echo $myrow['others']?></td>
</tr>
<tr>
<td width="35%">RECORD NUMBER:</td>
<td width="65%">"<?Php echo $myrow['userid']?></td>
</tr>
</table>

</body>

</html>
<?php
i= i + 1;
}
break;


case 'register' :


$sql = "INSERT INTO database (username,firstName,middlename,lastname,yourtitle, streetaddress,streetaddresscontinue,city,state,zip code,country,homephone,workphone,fax,email,organis ation,maritalstatus,occupation,religion,homepage,o thers) VALUES ('$firstname','$middlename','lastname','$yourtitle ','$streetaddress','$streetaddresscontinue','$city ,'$state,'$zipcode','$country,'$homephone','$workp hone,'$fax','$email','$organisation','$maritalstat us','$occupation','$religion','$homepage','$others ')";

$sqlresult = mysql_query($sql);
$myrow = mySQL_fetch_array($sqlresult);



?>

<html>

<head>
<title>DIRECTORY REGISTRATION</title>
</head>

<body bgcolor="#009900" text="#FFFFFF">

<p align="left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;
<marquee width="323" height="19" bgcolor="#009900" style="font-weight: bold">NIGERIANGREENPAGE&nbsp;
DIRECTORY REGISTRATION</marquee>
</p>
<p align="left"><font size="4">You registered with the information bellow:</font>
</p>
<table border="1" width="100%">
<tr>
<td width="35%">USER NAME:&nbsp;&nbsp;&nbsp;&nbsp; </td>
<td width="65%">&nbsp;"<?Php echo $myrow['username']?>"</td>
</tr>
<tr>
<td width="35%">FIRST NAME</td>
<td width="65%">"<?Php echo '$firstname'?></td>
</tr>
<tr>
<td width="35%">MIDDLE NAME:</td>
<td width="65%">"<?Php echo '$middlename'?></td>
</tr>
<tr>
<td width="35%">LAST NAME:</td>
<td width="65%">"<?Php echo '$lastname'?></td>
</tr>
<tr>
<td width="35%">TITLE:</td>
<td width="65%">"<?Php echo '$yourtitle'?></td>
</tr>
<tr>
<td width="35%">STREET ADDRESS:</td>
<td width="65%">"<?Php echo '$streetaddress'?></td>
</tr>
<tr>
<td width="35%">STREET ADDRESS CONTINUE:</td>
<td width="65%">"<?Php echo '$streetaddresscontinue'?></td>
</tr>
<tr>
<td width="35%">CITY:</td>
<td width="65%">"<?Php echo '$city'?></td>
</tr>
<tr>
<td width="35%">STATE:</td>
<td width="65%">"<?Php echo '$state'?></td>
</tr>
<tr>
<td width="35%">ZIP CODE:</td>
<td width="65%">"<?Php echo '$zipcode'?></td>
</tr>
<tr>
<td width="35%">COUNTRY:</td>
<td width="65%">"<?Php echo '$country'?></td>
</tr>
<tr>
<td width="35%">HOME PHONE:</td>
<td width="65%">"<?Php echo '$homephone'?></td>
</tr>
<tr>
<td width="35%">WORK PHONE:</td>
<td width="65%">"<?Php echo '$workphone'?></td>
</tr>
<tr>
<td width="35%">FAX:</td>
<td width="65%">"<?Php echo '$fax'?</td>
</tr>
<tr>
<td width="35%">E-MAIL:</td>
<td width="65%">"<?Php echo '$email'?></td>
</tr>
<tr>
<td width="35%">ORGANISATION:</td>
<td width="65%">"<?Php echo '$organisation'?></td>
</tr>
<tr>
<td width="35%">MARITAL STATUS:</td>
<td width="65%">"<?Php echo '$maritalstatus'?></td>
</tr>
<tr>
<td width="35%">OCCUPATION:</td>
<td width="65%">"<?Php echo '$occupation'?></td>
</tr>
<tr>
<td width="35%">RELIGION:</td>
<td width="65%">"<?Php echo '$religion'?></td>
</tr>
<tr>
<td width="35%">HOME PAGE:</td>
<td width="65%">"<?Php echo '$homepage'?></td>
</tr>
<tr>
<td width="35%">OTHERS:</td>
<td width="65%">"<?Php echo '$others'?></td>
</tr>
<tr>
<td width="35%">RECORD NUMBER:</td>
<td width="65%">"<?Php echo $myrow['userid']?></td>
</tr>
</table>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="http://www.nigeriangreenpage.com">&nbsp; HOME</a></p>

</body>

</html>

<?php

break;

case 'listing' :

$sql = mysql_query(nigeriandatabase,$db);
?>

<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>DIRECTORY LISTING</title>
</head>

<body bgcolor="#009900" text="#FFFFFF">

<p align="left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;
<marquee width="323" height="19" bgcolor="#009900" style="font-weight: bold">NIGERIANGREENPAGE&nbsp;
DIRECTORY LISTING</marquee>
</p>
<p align="left"><font size="4">ALL DATABASE LISTED BELLOW:</font>
</p>
<table border="1" width="100%">
<tr>


<?PHP
while($myrow = mySQL_fetch_array($sql) {

?>
<td width="35%">USER NAME:&nbsp;&nbsp;&nbsp;&nbsp; </td>
<td width="65%">&nbsp;"<?Php echo $myrow['username']?>"</td>
</tr>
<tr>
<td width="35%">FIRST NAME</td>
<td width="65%">"<?Php echo $myrow['firstname']?></td>
</tr>
<tr>
<td width="35%">MIDDLE NAME:</td>
<td width="65%">"<?Php echo $myrow['middlename']?></td>
</tr>
<tr>
<td width="35%">LAST NAME:</td>
<td width="65%">"<?Php echo $myrow['lastname']?></td>
</tr>
<tr>
<td width="35%">TITLE:</td>
<td width="65%">"<?Php echo $myrow['title']?></td>
</tr>
<tr>
<td width="35%">STREET ADDRESS:</td>
<td width="65%">"<?Php echo $myrow['streetaddress']?></td>
</tr>
<tr>
<td width="35%">STREET ADDRESS CONTINUE:</td>
<td width="65%">"<?Php echo $myrow['streetaddresscontinue']?></td>
</tr>
<tr>
<td width="35%">CITY:</td>
<td width="65%">"<?Php echo $myrow['city']?></td>
</tr>
<tr>
<td width="35%">STATE:</td>
<td width="65%">"<?Php echo $myrow['state']?></td>
</tr>
<tr>
<td width="35%">ZIP CODE:</td>
<td width="65%">"<?Php echo $myrow['zipcode']?></td>
</tr>
<tr>
<td width="35%">COUNTRY:</td>
<td width="65%">"<?Php echo $myrow['country']?></td>
</tr>
<tr>
<td width="35%">HOME PHONE:</td>
<td width="65%">"<?Php echo $myrow['homephone']?></td>
</tr>
<tr>
<td width="35%">WORK PHONE:</td>
<td width="65%">"<?Php echo $myrow['workphone']?></td>
</tr>
<tr>
<td width="35%">FAX:</td>
<td width="65%">"<?Php echo $myrow['fax']?>?</td>
</tr>
<tr>
<td width="35%">E-MAIL:</td>
<td width="65%">"<?Php echo $myrow['email']?></td>
</tr>
<tr>
<td width="35%">ORGANISATION:</td>
<td width="65%">"<?Php echo $myrow['organisation']?></td>
</tr>
<tr>
<td width="35%">MARITAL STATUS:</td>
<td width="65%">"<?Php echo $myrow['maritalstatus']?></td>
</tr>
<tr>
<td width="35%">OCCUPATION:</td>
<td width="65%">"<?Php echo $myrow['occupation']?></td>
</tr>
<tr>
<td width="35%">RELIGION:</td>
<td width="65%">"<?Php echo $myrow['religion']?></td>
</tr>
<tr>
<td width="35%">HOME PAGE:</td>
<td width="65%">"<?Php echo $myrow['homepage']?></td>
</tr>
<tr>
<td width="35%">OTHERS:</td>
<td width="65%">"<?Php echo $myrow['others']?></td>
</tr>
<tr>
<td width="35%">RECORD NUMBER:</td>
<td width="65%">"<?Php echo $myrow['userid']?></td>
</tr>
</table>

<?php
}
?>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="http://www.nigeriangreenpage.com">&nbsp; HOME</a></p>

</body>

</html>

<?PHP
break;

case 'Delete' :

"UPDATE database SET username''',firstname=''middlename='',lastName='', yourtitle='',streetaddress='',streetaddresscontinu e='',city='',state='',zipcode='',country='',Homeph one='',workphone='',fax='',Email='',organisation=' ',maritalstatus='',occupation='',religion='',homep age='',others='' WHERE username='$username'&&password='$password'" or echo 'No such record to delete, check your user name and password';

mySQLquery("SELECT * From database where username==$username&&password==$password) or die ("No record found delete succesful in nigeriangreenpage database!");

break;


case 'update' :


UPDATE database SET username''',firstname='$firstname'middlename='$mid dlename',lastName='$lastname',yourtitle='$yourtitl e',streetaddress='$streetaddress',streetaddresscon tinue='$streetaddresscontinue',city='$city',state= '$state',zipcode='$zipcode',country='$country',Hom ephone='$homephone',workphone='$workphone',fax='$f ax',Email='$email',organisation='$organisation',ma ritalstatus='$maritalstatus',occupation='occupatio n',religion='religion',homepage='homepage',others= 'others' WHERE username='$username'&&password='$password' or echo 'No such record to update, check your user name and password';

$sql= mySQLquery("SELECT * From database where username==$username&&password==$password) or die ("No record found update unsuccesful in nigeriangreenpage database!");

$myrow = mySQL_fetch_array($sql)
?>


<html>
<head>
<title>Database Update Result</title>
</head>

<body bgcolor="#009900" text="#FFFFFF">

<p align="left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;
<marquee width="323" height="19" bgcolor="#009900" style="font-weight: bold">NIGERIANGREENPAGE&nbsp;
DIRECTORY UPDATE RESULT</marquee>
</p>
<table border="1" width="35%">
<tr>
<td width="100%">NUMBER OF UPDATE 1"?></td>
</tr>
</table>
<table border="1" width="100%">
<tr>
<td width="35%">USER NAME:&nbsp;&nbsp;&nbsp;&nbsp; </td>
<td width="65%">&nbsp;"<?Php echo $myrow['username']?>"</td>
</tr>
<tr>
<td width="35%">FIRST NAME</td>
<td width="65%">"<?Php echo $myrow['firstname']?></td>
</tr>
<tr>
<td width="35%">MIDDLE NAME:</td>
<td width="65%">"<?Php echo $myrow['middlename']?></td>
</tr>
<tr>
<td width="35%">LAST NAME:</td>
<td width="65%">"<?Php echo $myrow['lastname']?></td>
</tr>
<tr>
<td width="35%">TITLE:</td>
<td width="65%">"<?Php echo $myrow['yourtitle']?></td>
</tr>
<tr>
<td width="35%">STREET ADDRESS:</td>
<td width="65%">"<?Php echo $myrow['streetaddress']?></td>
</tr>
<tr>
<td width="35%">STREET ADDRESS CONTINUE:</td>
<td width="65%">"<?Php echo $myrow['streetaddresscontinue']?></td>
</tr>
<tr>
<td width="35%">CITY:</td>
<td width="65%">"<?Php echo $myrow['city']?></td>
</tr>
<tr>
<td width="35%">STATE:</td>
<td width="65%">"<?Php echo $myrow['state']?></td>
</tr>
<tr>
<td width="35%">ZIP CODE:</td>
<td width="65%">"<?Php echo $myrow['zipcode']?></td>
</tr>
<tr>
<td width="35%">COUNTRY:</td>
<td width="65%">"<?Php echo $myrow['country']?></td>
</tr>
<tr>
<td width="35%">HOME PHONE:</td>
<td width="65%">"<?Php echo $myrow['homephone']?></td>
</tr>
<tr>
<td width="35%">WORK PHONE:</td>
<td width="65%">"<?Php echo $myrow['workphone']?></td>
</tr>
<tr>
<td width="35%">FAX:</td>
<td width="65%">"<?Php echo $myrow['fax']?>?</td>
</tr>
<tr>
<td width="35%">E-MAIL:</td>
<td width="65%">"<?Php echo $myrow['email']?></td>
</tr>
<tr>
<td width="35%">ORGANISATION:</td>
<td width="65%">"<?Php echo $myrow['organisation']?></td>
</tr>
<tr>
<td width="35%">MARITAL STATUS:</td>
<td width="65%">"<?Php echo $myrow['maritalstatus']?></td>
</tr>
<tr>
<td width="35%">OCCUPATION:</td>
<td width="65%">"<?Php echo $myrow['occupation']?></td>
</tr>
<tr>
<td width="35%">RELIGION:</td>
<td width="65%">"<?Php echo $myrow['religion']?></td>
</tr>
<tr>
<td width="35%">HOME PAGE:</td>
<td width="65%">"<?Php echo $myrow['homepage']?></td>
</tr>
<tr>
<td width="35%">OTHERS:</td>
<td width="65%">"<?Php echo $myrow['others']?></td>
</tr>
<tr>
<td width="35%">RECORD NUMBER:</td>
<td width="65%">"<?Php echo $myrow['userid']?></td>
</tr>
</table>

</body>

</html>


break;
default :

?>


<head>
<title>Nigeriangreenpage Register Edit Delete Search</title>
</head>

<body bgcolor="#009900" text="#FFFFFF">

<h1 align="center">NIGERIANGREENPAGE</h1>

<hr>
<p align="center">
<marquee style="text-decoration: blink; font-weight: bold; font-size: .5in" bgcolor="#009900" width="418" height="55">The
option botton is very important. The default is register. Thank you!</marquee>
</p>
<form name="Free Registration" onsubmit method="POST" action="formprocess.php3">
<p><b><font size="4"><u>Select what you want to do'</u></font></b></p>
<b><blink><font color="#FF0000" size="5">What do you want to do?</font></blink></b>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="form" value="search"><b><font color="#FF0000">Search</font>&nbsp;</b>&nbsp;&nbsp;
<input type="checkbox" name="form" value="register"> <font color="#FF0000"><b>Register</b></font>&nbsp;&nbsp;&nbsp;
<input type="checkbox" name="form" value="listing"><font color="#FF0000"><b>Listing</b></font>&nbsp;&nbsp;
<input type="checkbox" name="form" value="delete"><b><font color="#FF0000">Delete
<input type="checkbox" name="form" value="update">Update</font></b></p>
<blockquote>
<table>
<tbody>
<tr>
<td align="right"><em><b><font size="4">User Name:</font></b></em></td>
<td><input size="60" value="I beg wating be the user name" name="UserName"></td>
</tr>
<tr>
<td align="right"><em><b><font size="4">Password:</font></b></em></td>
<td><input size="60" value="password" name="Password" type="password"></td>
</tr>
<tr>
<td align="right"><em><b><font size="4">Password:</font></b></em></td>
<td><input size="60" value="password" name="Password1" type="password"></td>
</tr>
<tr>
<td align="right"><em><b><font size="4">First Name</font></b></em></td>
<td><input size="60" value="Wating be the First Name?" name="FirstName"></td>
</tr>
<tr>
<td align="right"><em><b><font size="4">Last Name</font></b></em></td>
<td><b><font size="4"><input size="60" value="Wating be Last Name?" name="LastName"></font></b></td>
</tr>
<tr>
<td align="right"><em><b><font size="4">Middle Initial</font></b></em></td>
<td><input maxLength="1" size="60" value="Wating be Middle Name?" name="MiddleName"></td>
</tr>
<tr>
<td align="right"><em><b><font size="4">Title</font></b></em></td>
<td><input size="60" value="Wating be the Title? u be Chief, Bale,..." name="Title"></td>
</tr>
<tr>
<td align="right"><em><font size="4"><b>Street Address</b></font></em></td>
<td><input size="60" value="The street address?" name="StreetAddress"></td>
</tr>
<tr>
<td align="right"><em><b><font size="4">Address (cont.)</font></b></em></td>
<td><input size="60" value="Oga, the address dey long? continue... " name="StreetAddressContinue"></td>
</tr>
<tr>
<td align="right"><em><b><font size="4">City</font></b></em></td>
<td><input size="60" value="Which City be that?" name="City"></td>
</tr>
<tr>
<td align="right"><em><b><font size="4">State/Province</font></b></em></td>
<td><input size="60" value="I beg, the State o!" name="State"></td>
</tr>
<tr>
<td align="right"><em><b><font size="4">Zip/Postal Code</font></b></em></td>
<td><input maxLength="12" size="60" value="no be for naija. u get?" name="ZipCode"></td>
</tr>
<tr>
<td align="right"><em><b><font size="4">Country</font></b></em></td>
<td><input size="60" value="Which Country u dey?" name="Country"></td>
</tr>
<tr>
<td align="right"><i><b><font size="4">Home Phone</font></b></i></td>
<td><input maxLength="25" size="60" value="wating be the home fone?" name="HomePhone"></td>
</tr>
<tr>
<td align="right"><em><b><font size="4">Work Phone</font></b></em></td>
<td><input maxLength="25" size="60" value="Work fone dey?" name="WorkPhone"></td>
</tr>
<tr>
<td align="right"><em><b><font size="4">FAX</font></b></em></td>
<td><input maxLength="25" size="60" value="Fax dey?" name="Fax"></td>
</tr>
<tr>
<td align="right"><em><b><font size="4">E-mail</font></b></em></td>
<td><input size="60" value="e-mail na new thing o! u fit get one free @nigeriangreenpage.com" name="Email"></td>
</tr>
<tr>
<td align="right"><em><b><font size="4">Organisation</font></b></em></td>
<td><input size="60" value="Which Organisation ?" name="Organization"></td>
</tr>
<tr>
<td align="right"><b><font size="4"><i>Occupation</i>&nbsp;</font></b></td>
<td><input size="60" value="Oga, wating be una Job?" name="Occupation"></td>
</tr>
<tr>
<td align="right"><i><b><font size="4">Religion</font></b></i></td>
<td><input size="60" value="Oga Sir, Madam, which religion u dey?" name="Religion"></td>
</tr>
<tr>
<td align="right"><font size="3"><b>Marital Status</b></font></td>
<td><input size="60" value="married or single?" name="MaritalStatus"></td>
</tr>
<tr>
<td align="right"><em><b><font size="4">URL</font></b></em></td>
<td><input size="60" value="check nigeriangreenpagedotcom for urname.nigeriangreenpage.com" name="HomePage"></td>
</tr>
<tr>
<td align="right"><i><b><font size="4">Others</font></b></i></td>
<td><input maxLength="25" size="60" value="more tori?" name="Others"></td>
</tr>
</tbody>
</table>
</blockquote>
<p>
<input type="submit" value="Submit Form"> <input type="reset" value="Reset Form">
</p>
</form>
<hr>
<h5>Omo Yin<br>
Copyright © 2002[FastLinks]. All rights reserved.<br>
Revised: <!--webbot bot="TimeStamp" S-Type="EDITED" S-Format="%B %d, %Y" -->
</h5>

</body>

<?PHP

}
?>

























Reply With Quote
  #2  
Old July 31st, 2002, 02:12 AM
Matt Matt is offline
Contributing User
Codewalkers Specialist (4000 - 4499 posts)
 
Join Date: Apr 2007
Location: Florida
Posts: 4,158 Matt User rank is Private First Class (20 - 50 Reputation Level)Matt User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 h 10 m 20 sec
Reputation Power: 6
RE: HTML in PHP script

on line 36:

?>;

should only be ?>

line 34 needs a semicolon at the end.
line 35 needs a $ at in front of the variable..
line 55 is:

?

needs to be:

?>

I'd suggest going line by line of this script and look for errors, it seems to have quite a few...

Reply With Quote
  #3  
Old August 1st, 2002, 11:55 PM
olamide olamide is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Plymouth,IN ,USA
Posts: 19 olamide User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to olamide Send a message via Yahoo to olamide
RE: HTML in PHP script

i made the coorection matt gave me but am still getting the error

Reply With Quote
  #4  
Old August 2nd, 2002, 07:00 PM
sager sager is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 45 sager User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: HTML in PHP script

Just general coding advice:
When you write your code, write it in chunks. I mean, write a little, test it
write a little more test it again....
This is one of the first things they taught me in college, I know many think
it will save you time by writing it all at once then trying to run it, but
in the long run it doesn't.

-Sager

Reply With Quote
  #5  
Old August 3rd, 2002, 09:14 PM
postalcow postalcow is offline
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Ford CIty, PA USA
Posts: 1,267 postalcow User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
Send a message via Yahoo to postalcow
RE: HTML in PHP script

What is the exact error you are getting. If yo are using vi turn on line numbering (<esc> :set nu )Are there spelling mistakes in this line?
mySQLquery("SELECT * From database where username='$username' or firstname='$firstname' or Middlename='$middlename' or lastname='$lastname' or yourtitle='$yourtitle' or streetname=='$streetname' or streenamecontinue='$streetnamecomntinue' or zipcode='$zipcode' or country='$country' or homephone='$homephone' or workphone='$workphone' or fax='$fax' or maritalstatus='$maritalstatus' or occupation='$occupation' or religion='$religion' or homepage='$homephage' or others='$others', $db)

Middlename (Capital letter "M")
$homephage (Should it be homepage?)




Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Coding > HTML in PHP script


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT