magnetica Posted February 25, 2007 Share Posted February 25, 2007 Good Good.. Only having a laugh Not a relevant place to put this.. but is there anywhere that tells when your title e.g. Noobie, NonSpammer, Forum Helper goes up when you have enough posts Quote Link to comment Share on other sites More sharing options...
Yesideez Posted February 25, 2007 Share Posted February 25, 2007 Not that I've found but then I've not looked. ow-design: What are the field names for the job title and description? Quote Link to comment Share on other sites More sharing options...
ow-design Posted February 25, 2007 Author Share Posted February 25, 2007 job title is name description is description thanks! Quote Link to comment Share on other sites More sharing options...
Yesideez Posted February 25, 2007 Share Posted February 25, 2007 Try this but don't forget to edit the SELECT call for your table data! <?php include("db.php"); // Get a connection to the database $jobid=$_GET['id']; $cxn = @ConnectToDb($dbServer, $dbUser, $dbPass, $dbName); <table width="600" border="0">; <?php if (is_numeric($jobid)) { $sql="SELECT * FROM jobs WHERE `jobid`='$jobid'"; $fetch=mysql_fetch_assoc(mysql_query($sql)); echo '<tr><td><strong>Job title:</strong></td><td>'.$fetch['name'].'</td></tr>'; echo '<tr><td><strong>Details:</strong></td><td>'.$fetch['description'].'</td></tr>'; } else { echo '<tr><td>I am unable to locate that job - sorry!</td></tr> } ?> </table> </html> Quote Link to comment Share on other sites More sharing options...
ow-design Posted February 26, 2007 Author Share Posted February 26, 2007 okay new error on jobdetails.php Parse error: syntax error, unexpected '<' in /home/deswo/public_html/clients/martin_pooley/jobdetails.php on line 11 line 11 is: <table width="600px"> [/code Quote Link to comment Share on other sites More sharing options...
Yesideez Posted February 26, 2007 Share Posted February 26, 2007 Oops! <?php include("db.php"); // Get a connection to the database $jobid=$_GET['id']; $cxn = @ConnectToDb($dbServer, $dbUser, $dbPass, $dbName); ?> <table width="600" border="0"> <?php if (is_numeric($jobid)) { $sql="SELECT * FROM jobs WHERE `jobid`='$jobid'"; $fetch=mysql_fetch_assoc(mysql_query($sql)); echo '<tr><td><strong>Job title:</strong></td><td>'.$fetch['name'].'</td></tr>'; echo '<tr><td><strong>Details:</strong></td><td>'.$fetch['description'].'</td></tr>'; } else { echo '<tr><td>I am unable to locate that job - sorry!</td></tr> } ?> </table> </html> Quote Link to comment Share on other sites More sharing options...
Archadian Posted February 26, 2007 Share Posted February 26, 2007 In the code i gave you all you have to do is make a table to show the details on jobdetails.php and in the mysql_query() you have to put the name of the columns and the name of the table where the info on the jobs are. When i said my code wouldn't work i meant you have to put in the correct table names Quote Link to comment Share on other sites More sharing options...
ow-design Posted February 26, 2007 Author Share Posted February 26, 2007 next prob? cant figure it out?? Parse error: syntax error, unexpected $end in /home/deswo/public_html/clients/martin_pooley/jobdetails.php on line 23 line 27 reads: </html> Quote Link to comment Share on other sites More sharing options...
Yesideez Posted February 26, 2007 Share Posted February 26, 2007 I forgot to terminate an echo... echo '<tr><td>I am unable to locate that job - sorry!</td></tr>'; This happens when tired lol Quote Link to comment Share on other sites More sharing options...
ow-design Posted February 26, 2007 Author Share Posted February 26, 2007 thanks!!, is working now, but when i click link from jobs.php the jobdetails.php just says unable to find job. Sorry to keep you awake. Ollie Quote Link to comment Share on other sites More sharing options...
Yesideez Posted February 26, 2007 Share Posted February 26, 2007 Edit this line in the first script from this: <a href="jobdetails.php?<?php echo $fetch["id"]?>">More About Vacancy</a></font></td> to this: <a href="jobdetails.php?id=<?php echo $fetch["id"]?>">More About Vacancy</a></font></td> My mistake again! Quote Link to comment Share on other sites More sharing options...
ow-design Posted February 26, 2007 Author Share Posted February 26, 2007 ok, looking better but am geting following message: Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/deswo/public_html/clients/martin_pooley/jobdetails.php on line 15 [b]Job title: Details: [/b] line 15 reads: $fetch=mysql_fetch_assoc(mysql_query($sql)); Quote Link to comment Share on other sites More sharing options...
Archadian Posted February 26, 2007 Share Posted February 26, 2007 shouldn't it be this: $fetch=mysql_fetch_assoc($sql); Quote Link to comment Share on other sites More sharing options...
Yesideez Posted February 26, 2007 Share Posted February 26, 2007 You'll often find that the error often lies in a previous line or two before the line you get told it's in. As I said earlier, the error is actually in the line that assigns the variable $sql the SELECT call - change it to suit your database. Quote Link to comment Share on other sites More sharing options...
Yesideez Posted February 26, 2007 Share Posted February 26, 2007 shouldn't it be this: $fetch=mysql_fetch_assoc($sql); Sort of but we need to go one line before that because the SELECT call itself is wrong. ow-design hasn't changed it to suit his database and has used the default one I posted as an example. Quote Link to comment Share on other sites More sharing options...
magnetica Posted February 26, 2007 Share Posted February 26, 2007 ow-design try this: mysql_query($sql); $fetch=mysql_fetch_assoc($sql); Tell if it works or not Quote Link to comment Share on other sites More sharing options...
magnetica Posted February 26, 2007 Share Posted February 26, 2007 Well lets take a look at the SELECT statement then Post it on here Quote Link to comment Share on other sites More sharing options...
ow-design Posted February 26, 2007 Author Share Posted February 26, 2007 Fantastic!!! got it to work.!!! Thankyou so much to everyone who has helped me!!! ESPECIALLY Yesideez !! Really appreciate it!!! Really Happy now:) Quote Link to comment Share on other sites More sharing options...
Yesideez Posted February 26, 2007 Share Posted February 26, 2007 I'm glad to hear it! You're just in time as I've got 8 minutes left as well Quote Link to comment Share on other sites More sharing options...
ow-design Posted February 26, 2007 Author Share Posted February 26, 2007 Thanks for being so kind ! good night! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.