Jump to content

Ell20

Members
  • Posts

    337
  • Joined

  • Last visited

    Never

Everything posted by Ell20

  1. Is your server configured to handle html as php? By the way... what file extension is on the code you have posted? *.php ? I have no idea, before I attempted to make the changes to the CSS it was working fine. The code I have posted is newcss.php. Thanks
  2. That dosent work either, no message displayed either. Is the possible reason for this that on the php page header.html is called, header.html then calls the CSS? The reason there is no session_start() is because the header.html includes this, which is included on every page. Thanks
  3. It still dosent like it for some reason. In the database I have stored: '#999999' as bgcolor and '#ffffff' as text color. Thanks
  4. Sorry if im being blind but I cant see anything differences between mine and your code? Thanks
  5. I have tried to query the database in the normal way and for some reason its not working: <?php header("Content-type: text/css"); require_once ('mysql_connect.php'); include_once ('includes/functions.php'); $id = $_SESSION['club_id']; $query = "SELECT * FROM club WHERE club_id = '$id'"; $result = mysql_query($query); $row = mysql_fetch_assoc($result); $bgcolour = $row['bgcolour']; $textcolour = $row['textcolour']; ?> body { color: <?=$textcolour?>; background-color: <?=$bgcolour?>; } Can you see anything wrong with this? Thanks
  6. Hi, Can you use PHP and/or MySQL in CSS? If so how is this done? Thanks
  7. Ell20

    PHP Help

    I have just tried this. I have got it working if I just set the variables within the page e.g: <?php header("Content-type: text/css"); $pageBG = '#fff'; ?> body { background:<?=$pageBG?>; } However ideally I would like to be able to use a mysql query to query the database and get the colours entered by the user. Is this possible? Thanks
  8. Ell20

    PHP Help

    Excellent, just was I was looking for. Thanks so much for the help.
  9. Ell20

    PHP Help

    Actually you can put variables in stylesheets using php. Just need to set the header as text when you deliver the css / php file to the l client. As long as the stylesheet is on your server you can put as much php as you want in it. How do you mean? Sorry I dont follow?
  10. Ell20

    PHP Help

    Argh I see, how annoying is that! Thanks for the help
  11. Ell20

    PHP Help

    Oh right so you can add PHP/Variable into stylesheets? Thats excellent! Thanks I can add a lot of customisation using that method! Thanks
  12. Ell20

    PHP Help

    Hmm that makes it harder then, because ill end up having hundreds of stylesheets! Think ill just stick to the colour customisation! Thanks
  13. Ell20

    PHP Help

    Just another quick question. If I want my user to be able to select their own font say Arial, is it possible for that font to be added in? Could it be done in a simular way? Store in the DB then get the information out and put it into the CSS? Cheers
  14. Ell20

    PHP Help

    I havent tried it yet so I was unsure whether this would be possible and being fairly new to PHP/MySQL I didnt want to get involved with something if it wasnt physically possible to do it in this manner. I shall give it a go! Thanks for the info.
  15. Ell20

    PHP Help

    Hi, I have a website which uses one CSS for all sites my users create. However would it be possible to add a feature in the Admin panel for the user to select the basic colour e.g Red, Blue, Green Once submitted the colour of the page can be changed using this? I have a database so I could store say Red into the club table. Then use a query to check what colour is stored then say if($css == Red) { use this css } kind of thing? I hope this kind of makes sense. Thanks
  16. Hi, I am having abit of a nightmare with displaying the date. I have set up my mysql field to be date, but that requires a format of Y, M, D and because im english, and this is going to be an english website I want the date to be in D, M, Y format. I have this: <?php echo $date2; date('Y-M-D', $date2); ?> The first prints: 2007-11-09 The second errors: An error occured in script /home/mysport/public_html/stats.php on line 93: A non well formed numeric value encountered What the best way to get this working properly? Thanks
  17. Thanks for your help but I would have no idea where to start with that. Elliot
  18. Hi, Just got round to trying it and I got the following error: Fatal error: Call to undefined function: curl_init() in /home/scrpgco/public_html/curl.php on line 8 Thanks
  19. Hey, There are 6 voting sites but they all work in a very simular way. This is the main one: http://www.mmorpgtoplist.com/in.php?site=7776 This is the link which is given to the users which takes them straight to voting for his site, however at the moment he has no way of determining whether or not the actual vote button is pressed. Thanks for your help
  20. Hi, My friend has a website which gives bonuses to players who vote for the site on a voting site. However at the monent all the user has to do is click the link to open the window in a new window and they recieve the bonus. Is there anyway in which he can determine or not whether the actual vote button was pressed, if it was then give the bonus, otherwise dont give any bonuses until its actually been pressed? Thanks for your help. Elliot
  21. Fixed. I simply moved where the thumbnails were being created to after the information was inserted into the database. Thanks for your help.
  22. Thats because I didnt add all the code in just the bits in question. include_once ('includes/functions.php'); Thanks
  23. function.php is called in at the top of the page? Thanks
  24. gallery.php <?php if (isset($_POST['submit'])) { if ($_FILES['imagefile']['type'] == "image/jpeg"){ copy ($_FILES['imagefile']['tmp_name'], "/home/mysport/public_html/images/UserImgs/".$_FILES['imagefile']['name'] = md5($_FILES['imagefile']['name'] . rand()) . $_FILES['imagefile']['name']) or die ("Could not copy"); echo '<h3><center>Picture Uploaded!</center></h3>';
  25. Thanks its worked as I have echoed the name of the file but I also have an error: An error occured in script /home/mysport/public_html/includes/functions.php on line 87: Undefined index: extension Line 87 of functions.php: if ( strtolower($info['extension']) == 'jpg' ) Thanks
×
×
  • 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.