Jump to content

Hell Toupee

Members
  • Posts

    41
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Hell Toupee's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hey I'm new to css and I created this page, i wanted to create two "table like" divs which occupy the same area horizontally, however i can't get it to work. If you go to http://predictions.redandwhitekop.com/borders.html you'll see what i mean, whilst a yellow block forms beside another, the text "dasds" is still put onto the next line, you can view the source code on the site. Also...you'll need firefox to view it, IE doesn't seem to work properly with it...if someone could tell me how I would go about making it browser compatible that'd be great too, but for now it's just gettin it to look right in one that's doing my head in! Thanks in advance.
  2. I'd be inclined to disagree, it'd certainly mean that you'd be needlessly using more extensive queries to select all of the posts from a topic, as you'd need to select the post field from the topic and all the other posts themselves. It's also the case, that you'd need to complicate things further when editing a post, you'd need a conditonal statement to check if it's the first post or not, so that it's updating data in the right table. Whilst this is of course pretty simple to do, it still complicates things needlessly, might aswell normalise everything fully if you're going to at all.
  3. First off, get rid of all the @'s when devloping stuff. To make the file random: $upload_Name =md5(time().$upload_Temp); I dunno what you mean by the second part, if you don't want it to email people, just remove this bit of code: //CHANGE THIS TO THE YOUR DOMAIN $upload_URL = "http://www.playin2much.co.uk/uploads/uploads/".$upload_Name ; //------------ $pfw_header = "From: RickHope@Playin2much.co.uk"; $pfw_subject = "Your Music Code - Uploaded @ Playin2much.co.uk"; // CHANGE THIS TO YOUR EMAIL ADDRESS $pfw_email_to = "$email"; //------------ $pfw_message = "Song Name: $Name\n" . "Your Email: $email\n" . "Upload URL: $upload_URL\n\n\n" . "Copy all the code below and paste it into your webpage's HTML box.\n\n\n" . "<table border=\"0\" width=\"287\"><tr><td width=\"281\"><embed style=\"FILTER: xray\" name=\"RAOCXplayer1\" width=\"310\" height=\"43\" src=\"$upload_URL\" autostart=true ShowStatusBar=false ShowControls=true Cache=True loop=\"true\" type='application/x-mplayer2' volume=\"65\"><a href=\"http://www.playin2much.co.uk/index.html\"><img border=\"0\" src=\"http://www.playin2much.co.uk/images/Image8.gif\" width=\"310\" height=\"22\">[/url]</div></tr></table>\n\n\n\n\n" . "Thanks Rick Hope, Owner of Playin2much.co.uk" . "RickHope@Playin2much.co.uk"; @mail($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ; And what code do you want to appear on the next page?
  4. Have a boolean field in the table which indicates whether or not the bulletin has been read. Then later on the line where you display the subject of the bulletin have an ifstatement like: if ($row[booleanfield]=true){ echo("bulletin subject with red color"); }else{ echo("bulletin subject with normal color"); }
  5. What kind of message? By email? After the query which inserts the comment into the database, use mail() to send an email to the administrator's address. http://uk2.php.net/manual/en/ref.mail.php Check it out and come back with any problems sure.
  6. Why not run it and see? If there's any error messages or things you don't understand, but askin to look through the whole script and see if it's ok is a bit too general. That said it looks fine, but there could easily be some small syntax error that could be overlooked.
  7. How do you mean looping? Does it continually echo ""<br><font color=red>links :</font> " . $val[0] . "\r\n";" ? You could maybe but the if statement before the preg_match_all, it probably make a difference but there's no need to use a regular expression first, it'd make the script for time efficient even if it doesn't work.
  8. You wouldn't need to, you could simply use explode to find out the extension: $url="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"; // (in your script it'd be a dynamic variable) $extension=explode(".", $url); if (($extension[1]=='dtd') || ($extension[1]=='css')){ echo "move to next link"; } EDIT: Corrected a couple syntax errors
  9. Alternatively, you could implement a templating class to seperate everything for you, if you're making a site with many many pages then I'd recommend this, it's alot easier to edit the php than have to trudge through long lists of html aswell - often is the case that only the php needs to be edited, not the html. I think there's a tutorial on how to make your own on the phpfreaks site, short of that simply search google for smarty template or fast templates for two good already existing templating classes. You could do what dswain suggested, and use php within the html, or you could use html within php using echo("<table=blah blah><tr><td></td></tr></table>") etc for example, there's lots of avenues you can go down.
  10. target=_blank is html, not php so it won't work. There's a Window-Target parameter with header() but if memory serves me right there's difficulties with passing information on or opening up a new window, I'd recommend just mixing the php code up with javascript and using window.open or something similar.
  11. Where is $sql defined? That's the query that you're running, and that's the query that needs to have LIMITs on it, not $query, sorry I didn't see that.
  12. The stuff I've changed is in red. I moved the query down, so that the variables the pagination system needs are declared before the query is declared, so it can use them. Notice the "LIMIT $start,$display" that has been added, aswell as the start and display variables themselves, if you need help understanding the math involved or if it doesn't work, feel free to ask again, hope it works!
  13. You need to use somethin like preg_replace, with a regular expression similar to: $text=preg_replace('/\[a href\=(.*?)\]/si','<img src="image/hatespammers.gif" alt="(hatespammers)',$gbvalues); That will replace any text that begins with "[a href= until the next ]" and replace it with your image. However, you may need to change this if the actual code the users are entering is or html with < brackets. Good luck.
  14. Just adjust it, and add the WHERE in yourself? If you don't want to select all the fields use "Select field1,field2,field3" instead of "Select *". "Select *" means SELECT ALL fields for each record, not select all the rows so whether or not there are 40,000 rows makes no difference, that's where the LIMIT matters. Hope you understand that, feel free to paste your query with all its conditions if you don't.
  15. When you say you enter your own criteria and it works fine, do you mean you just change the source code and change the query getting rid of all the variables? How are you variables passed onto the form? Is the method of the form "post" or "get"?
×
×
  • 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.