|
||||||
| PHP Forum Use this forum to discuss all aspects of PHP Development. PHP is a server-side, cross-platform, HTML embedded scripting language that lets you create dynamic web pages. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
| Sponsored Links |
|
|
|
|||||
|
In add.php change
PHP Code:
PHP Code:
As for view.php: PHP Code:
PHP Code:
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum | My Blog Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall |
|
|||
|
On first look, I see ' ', with a field of type INT. So change this:
VALUES ('$id') with this VALUES ($id). When you have value of type INT, you should not use ''. After that, if there are still problems, make what Sidewinder said. Happy new year .
__________________
You can visit something interesting HERE |
|
|||||
|
thank u Sidewinder & penkomitev for your quick answer
![]() i applyed what u said Sidewinder, everythig ok with add.php file ![]() but the error still there with view.php file it says PHP Code:
PHP Code:
__________________
begginer programmer needs the help
![]() |
|
|||||
|
Quote:
when i remove the ' ', its appear an error but when i keep it like that its fine, is it important to remove it from INT type?
__________________
begginer programmer needs the help
![]() |
| Sponsored Links |
|
|
|
|||
|
Well, it is not used with INT. But are you sure your field is INT?(Well it may be silly question, but let me to ask everything) From the error you receive, I understand your query is bad. So make: print $sql and try to execute the query trough phpMyAdmin or the one you are using. Look at the error, phpMyAdmin return and you will understand what the problem is. Remebmer from me:
Code:
Warning: Supplied argument is not a valid MySQL result resource in c:apachehtdocsguest_bookview.php on line N Happy new year to all of you, who are GMT+1 or higher. For the others, have a little bit more patience .
__________________
You can visit something interesting HERE Last edited by penkomitev; 12-31-2007 at 06:38 PM. |
|
|||||
|
Quote:
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum | My Blog Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall |
|
|||||
|
hi penkomitev , Sidewinder & happy new year
![]() this is the sql query PHP Code:
it show the form data from guest.php file still the problem with the query ?
__________________
begginer programmer needs the help
![]() |
|
|||||
|
Yes, your WHERE clause makes no sense. A WHERE clause is used as a conditional, meaning you need to use an operator so the SELECT statement can evaluate its 'truth.' Have a look here for more information on the SQL WHERE Clause
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum | My Blog Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall Last edited by John; 01-01-2008 at 04:24 PM. |
|
|||
|
Both with Sidewinder were talking about printing
Code:
$sql= "INSERT INTO $tbl_guest(id, guestname, gender, palce, email, title, comment)VALUES ('$id','$guestname', '$gender', '$place', '$email' ,'$title', '$comment')"; // the error is here
.
__________________
You can visit something interesting HERE Last edited by penkomitev; 01-01-2008 at 04:36 PM. |
| Sponsored Links |
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|