Jump to content

dragon_sa

Members
  • Posts

    520
  • Joined

  • Last visited

About dragon_sa

  • Birthday 12/06/1972

Contact Methods

  • Website URL
    http://www.saint.com.au

Profile Information

  • Gender
    Male
  • Location
    South Australia

dragon_sa's Achievements

Member

Member (2/5)

0

Reputation

  1. also this { mail($to, $sub, $mes, $headers); } should be mail($to, $sub, $mes, $headers); } else {
  2. This line if(($_SESSION['security_code'] != $_POST['security_code']) || (empty($_SESSION['security_code'])) ){ should be if(($_SESSION['security_code'] == $_POST['security_code']) && (!empty($_SESSION['security_code'])) ){ as this section of the code wants to send the message so it must comply to your if statement, you were saying if it does not equal the code or the code is empty send the message
  3. I dont think its your problem, but when repeating-x you dont need the center property on the background-position, I cant repeat your problem here.
  4. are you sure your get_all_subjects(); is connecting to the database and returning any data, as you havent provided this bit of code(minus any usernames and passwords) we cant see what is going on, we cant see where your variables are meant to be coming from
  5. try removing the ticks from the table name $query ="INSERT INTO companies (company_name, contact_name, location, postcode, street1, street2, city, phone, email, basicpackage_description, premiumuser_description, password, salt, approved, upload) VALUES ('$company_name', '$contact_name', '$location', '$postcode', '$street1', '$street2', '$city', '$phone', '$email', '$basicpackage_description', '$premiumuser_description', '$password', '$salt', '$approved', '$upload')";
  6. remove this bit } /* if artist is set display the artist */ if($artist="") { That is already handled in the if statement I gave you be sure to remove all the code I showed eg including the curly braces
  7. I have had a bit of a trawl through that code, I can so far only find 2 spots that refer to the page=Product in what you have given so far and that is on your search page I cant find anywhere where that $Pagedescr gets set, so you need to find out what table has the product description and which column name, The easiest thing to do on the index page would be to query the database for the product id that gets sent and then get the associated product description, once you have that you can set the title. Remove that title query you had as title already gets set a bit further down your index page so we will need to modify that if a product has been selected.
  8. remove this bit /* check to see if an artist has been selected */ if(!$_GET['artist']) { $artist = 0; }else{ $artist = $_GET['artist']; } and change your if($artist>0) { to if(isset($_GET['artist']) && $_GET['artist'] != '') { $artist = mysql_real_escape_string($_GET['artist']); //rest of your code here
  9. is the value for artist sent in the link here actually a number? <a href="artist.php?artist=<?PHP echo $row['artist']; ?>"> I see you use the same part row here for the artist name <b><font size="5"><?PHP echo $artist; ?></font></b> <br> so if the value are sending is not a number this will fail if($artist>0) {
  10. which page has the product links used to select products?
  11. Does the index page get loaded everytime you select a product or does only the section where the product page get loaded? To change the title of the index page it needs to be reloaded, the code to evaluate the the title will need to be on the index page, when you click on a product you would be able to add the page title to the link and then call that page title on the index page. The product page itself has no part of this, we wil need to perform the work on the index page, and the index page will need to reload for each product called
  12. are we not talking about the title for the product page each time a product is displayed? If not how does your page work when you are viewing a product, does the product page get called into another page? We are going to need more code for how that variable $Pagedescr is set and when and where it is set.
  13. variables are case sensitive as the first note, secondly you are checking for pageTitle when you should be checking for the variable you want to echo i am assuming it is $Pagedescr so your code should be more like this <title><?php if (isset($Pagedescr)) { echo $Pagedescr; } else { echo "Name of the company"; } ?></title>
  14. You can do this using getimagesize(); eg $img = "someimage.jpg"; // the image you want to check list($width, $height) = getimagesize($img); // gets the width and height as variables $width and $height // add you if statement conditions here and echo your results or set your variables based on results Keep in mind that not all images are square so you might want to think about testing for the largest size and scale that way, this should get you started, try some coding and if you get stuck let us no and post your attempt.
  15. - You initially declare and set your variables $a1, $a2, $a3. - You then call the function fix_names declaring that they are the 3 variables you want processed. - The variables inside the function are $n1, $n2, $n3, these are only available inside the function, and are set to the values of the 3 variables you declared when you call this function in this case $a1, $a2, $a3. - The function applies the formatting to the 3 variables and then returns the values to $a1, $a2, $a3 repectively. - You can call the same function many times like this <?php $a1 = "EDWARD"; $a2 = "thomas"; $a3 = "wriGHT"; $b1 = "bOB"; $b2 = "FRed"; $b3 = "johN"; $dave = "daVe"; $mark = "MARK"; $frank = "jasOn"; fix_names($a1,$a2,$a3); echo $a1." ".$a2." ".$a3."<br/>"; fix_names($b1,$b2,$b3); echo $b1." ".$b2." ".$b3."<br/>"; fix_names($dave,$mark,$frank); echo $dave." ".$mark." ".$frank."<br/>"; function fix_names(&$n1,&$n2,&$n3) { $n1 = ucfirst(strtolower($n1)); $n2 = ucfirst(strtolower($n2)); $n3 = ucfirst(strtolower($n3)); } ?> Try it for yourself
×
×
  • 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.