Jump to content

reddavis999

Members
  • Posts

    11
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

reddavis999's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. may i suggest you have a section on the site, preferably the first page, that explains what the site is, what it does and things like that. As a first time visitor to your site i was wondering, what the site is about? What am i signing up for? And what will a get from signing up. Red
  2. You probably changed some of the xhtml, but its now showing as invalid, dont worry, only one very small problem with it Red
  3. Im trying to send the id information over with $_GET, ive used it before in a website ive recently completed but this time its not working. Heres the code that the search form displays if ($count>0) { while ($row = mysql_fetch_array($search)) { echo '<p>Episode: '.$row['episode'].'<br>Beer: '.$row['beer'].'</p>'; echo '<p><a href=\"moreinfo.php?id=$row[id]\">Read More...</a>'; echo '<br><hr 50%>'; } }else { echo "no results available"; } ?> However when i click on 'Read more' it goes to this address %22moreinfo.php?id=$row[id]\%22 I dont understand why it does this. Thanks,Red
  4. ahhh ok. i get you. thanks for all you help. Red
  5. ok ok. I think its starting to click. Do you know of any tutorials, because im still a bit confused about how these ids are stored. ??? I probably need a little rest thanks
  6. thanks please correct me if im wrong... When a user submits a job, it goes to a script that creates a new page. This page is then stored in a table along with the job name, description etc.? Then when a user seaches 'programmer' jobs it will display links for the jobs, so when the user clicks on them it goes the page that was created earlier? What is this type of thing called, when it has .php?id=1 ? becuase i would like to look for some tutorials on it to learn more. thanks for your help
  7. no there not. Would i have to create a script to create a new html file everytime some uploads a job? then put the link to that file into the database? thats for the advice.
  8. Hi, ive created a simple search engine for a college project ive been working on. Heres the code... <?php session_start(); if ($_SESSION['logged'] != true) { header('location: register.php'); exit(); } ?> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>jobs</title> <meta name="generator" content="TextMate http://macromates.com/"> <meta name="author" content="Red Davis"> <!-- Date: 2007-05-08 --> <link rel="stylesheet" media="screen" type="text/css" href="style.css"/> </head> <body> <div id="header"> <div id="header1"> </div> <div id="header2"> </div> <div id="logo"> </div> <div id="header3"> </div> <div id="tabs"> </div> </div> <div id="leftbar"> </div> <div id="links1" <div id="home"><a href="index_logged_in.php">Home</a></div> <div id="investor"><a href="investor.htm">Investor</a></div> <div id="jobs"><a href="jobs.php">Jobs</a></div> <div id="register"><a href="register.php">Register</a></div> </div> <div id="welcome"> <?php echo "Welcome, ".$_SESSION['username'] ; ?> </div> <div id="logout"> <a href="logout.php">Logout</a> </div> <?php include ("name.inc"); mysql_connect ("$host","$username","$password") or die ("couldnt connect"); mysql_select_db ("$database") or die ("cannot select database"); //set variables $request = $_GET['dropdown']; $search = mysql_query("SELECT * FROM $table2 WHERE jobtype='$request'") or die (mysql_error()); while ($row = mysql_fetch_array($search)) { echo $row['jobtitle']."<br>"; } ?> <div id="rightbar"> </div> </body> </html> The search works fine but i want it to return links. So that if the user searched programmer jobs, the search would return the job title and a link to the full article (which would contain jobdescription). A bit like the youtube search. Thanks for your help, Red
  9. wow! what a quick reply, and thanks so much:) Isn't is annoying how it always the little things. cheers, Red
  10. hey everyone. Ive recently started learning PHP and have made a simple login script for my project for college. The problem i am having is that the session does not seem to be carried from page to page. The session variable is called $_session["logged"] Here is the code where the username and password is checked... <?php session_start(); include ("name.inc"); //connect to DB mysql_connect ("$host","$username","$password") or die ("couldnt connect"); mysql_select_db ("$database") or die ("cannot select database"); //Information sent from the form $myusername = $_POST['username']; $mypassword = $_POST['password']; $result = mysql_query("SELECT * FROM $table where username='$myusername' and password='$mypassword'"); //gets number of rows with query above $count = mysql_num_rows($result); //if the results matched then the number of rows will be 1... if($count == 1){ $_session['logged'] = "hello"; header("location:session.php"); } else { echo "wrong username and password"; } ?> And here is a file i made to check whether the information is being carried forward... <?php session_start(); echo $_session["logged"]; ?> Here is the website if you would like to see the problem. jobchaser.info username:admin password:password or username:john password:red Thanks for your help, Red
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.