problem with mysql
Posted by: k12 (---.easynet.co.uk)
Date: February 10, 2007 04:24PM

can anyone help me?

i created 5 tables through the php admin and three of them are storing data but other two tables not storing the data i don,t know why?

i checked all the php code and the primary key everything was fine i also check the status of the table was ok

the data does not store the data into that particular table is it something wrong with my php code? or my sql?



kaan

Options: ReplyQuote
Re: problem with mysql
Posted by: CyberSpatium (71.237.217.---)
Date: February 10, 2007 04:28PM

post your code please. there are many possible reasons for this but i need to see your code so I can get an idea of where to start


CyberSpatium
WAMP English Forum Admin
--------------------------------------

like my free support? help support me by checking out my new Newbie Webmaster Development Forum dedicated to the newbie webmaster here:
www.WebDevNewbie.com

Options: ReplyQuote
Re: problem with mysql
Posted by: k12 (---.easynet.co.uk)
Date: February 12, 2007 06:09PM

below is showing codes for application which is doesn,t store data into application table

i cannot do anything further without storing the data into that particular table
it would be great if u could help me on that

thank you






<?php
session_start();
?>

<html>
<head>
<title> Post application details into the database </title>
</head>
<body bgcolor = "#e8e8f4">

<center><h3><font face="Geneva, Arial, Helvetica, sans-serif"> Application Confirmation </font></h3></center>
<hr>
<br>

<?php


//connect to database

$Link = mysql_connect("localhost", "root", "kannan"winking smiley or die(mysql_error());
mysql_select_db("industrial_placement",$Link) or die(mysql_error());

// select database and table
$db_name = "industrial_placement";
$table_name = "application";





echo $_SESSION['job_ref_number'];
$date = date("Y-m-d"winking smiley;
echo $job_ref_no;

$app_ref_number = 'APP'.$_SESSION[job_ref_number];
echo $app_ref_number ;

//Inserting the data into application


$query = ("INSERT INTO application( app_ref_number, s_id,
job_ref_number, app_date, app_status)
VALUES ('$app_ref_number', '$_SESSION[s_id]', '$_SESSION[job_ref_number]', '$date', 'open')"winking smiley;

$result = mysql_db_query($db_name, $query, $Link );



mysql_close($Link);



?>


<div style = "position:absolute; left:370; top:600;">
<a href="javascript: history.go(-2)">Vacancy List</a>


</body>
</html>



kaan

Options: ReplyQuote
Re: problem with mysql
Posted by: CyberSpatium (71.237.217.---)
Date: February 12, 2007 06:46PM

<?php
session_start();
?>

<html>
<head>
<title> Post application details into the database </title>
</head>
<body bgcolor = "#e8e8f4">

<center><h3><font face="Geneva, Arial, Helvetica, sans-serif"> Application Confirmation </font></h3></center>
<hr>
<br>

<?php

// select database and table
$db_name = "industrial_placement";
$table_name = "application";


//connect to database

$Link = mysql_connect("localhost", "root", "kannan"winking smiley or die(mysql_error());
mysql_select_db($db_name, $Link) or die(mysql_error());







echo $_SESSION['job_ref_number'];
$date = date("Y-m-d"winking smiley;
echo $job_ref_no;

$app_ref_number = 'APP'.$_SESSION[job_ref_number];
echo $app_ref_number ;

//Inserting the data into application


$query = ("INSERT INTO application( app_ref_number, s_id, job_ref_number, app_date, app_status)
VALUES ('$app_ref_number', '$_SESSION['s_id']', '$_SESSION['job_ref_number']', '$date', 'open')"winking smiley;

$result = mysql_query($query, $Link );



mysql_close($Link);



?>


<div style = "position:absolute; left:370; top:600;">
<a href="javascript: history.go(-2)">Vacancy List</a>


</body>
</html>



CyberSpatium
WAMP English Forum Admin
--------------------------------------

like my free support? help support me by checking out my new Newbie Webmaster Development Forum dedicated to the newbie webmaster here:
www.WebDevNewbie.com

Options: ReplyQuote
Re: problem with mysql
Posted by: k12 (---.easynet.co.uk)
Date: February 12, 2007 08:54PM

now i get this error
the codes was working without error but it not stooring data into the that table(application



Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in C:\wamp\www\www\application.php on line 44


thank you



kaan

Options: ReplyQuote


Sorry, only registered users may post in this forum.