Jump to content

DarkSuperHero

Members
  • Posts

    342
  • Joined

  • Last visited

Everything posted by DarkSuperHero

  1. if its a domain name you could use gethostbyname.... http://us3.php.net/manual/en/function.gethostbyname.php
  2. how about splitting up the swf into parts.. eg external images loading, some xml to define where your images are... I recently did a project in which about 13megs of images were used, but all were loaded externally....loaded as needed...
  3. 3 divs... One aligned to the top, absolutly positioned....would have your top color one with your content no background color one aligned to the bottom, absolutely positioned, have the background be an image with your bottom background color set your body background to the color of your desired middle section.... :-D usually the way i go about this... make your top and bottom divs 100% wide, and tile the background in the x direction only... :-)
  4. if(isset($_POST['button']) && ($_POST['form'] != null)) { echo 'choose something'; } else{ echo 'great choice!'; }
  5. would it be possible to set a cookie avaiable across multiple domains when you set the domain option? eg: cookie is created by xy.com with a domain parameter of yz.com ....would that work...?
  6. i believe its sent as its parsed.....it would only be held back if you were using output buffering I believe...I could be wrong...anyone ?
  7. include 'connect.php'; $self = $_SERVER['PHP_SELF']; $query = "SELECT id, img_name, img_type, img_size, img_data FROM img_tbl ORDER BY id"; $result = mysql_query($query) or die(’Error, query failed’); while($row = mysql_fetch_array($result)){ echo “<img src=”viewimage.php?id=$row[id]” width=”55” height=”55” /> <br/>”; } mysql_close($dbconn); wasnt he just missing the ; after his include?
  8. use some CSS :-) <form method='post' action="login.php"> <div style="width:300px;"> <label for="name" style="float:left;">Name:</label> <input type="text" name="uname" id="name" size="16" style="float:right;clear:right"/> <label for="pass" style="float:left;clear:left">Password:</label> <input type="text" name="pword" id="pass" size="16" style="float:right;clear:right"/> <input type="submit" name="submit" value="login" style="float:right;clear:both;"/> </div> </form> Also fixed some errors u had in your code... Try it out: http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_label to have the labels and the text fields closer together adjust the overall width of the div wrapping your elements...
  9. the input box hight is too small, text does not fit inside. Your going to need to adjust the font-size inside the input, and style the label text.....but if its part of larger page it might already be done.... What are you exactly trying to get this to display ? Maybe post an image of the expected output and we canhelp you make it look like it 'should'.
  10. WOW! This thread had def opened my eyes. I always felt there was more to the html vs xhtml thing.... I will definitly be using html alot more than xhtml... ..does any one think that when HTML 5 is 'official' it will receive the hype that xHTML did?
  11. well, if you think about it people who design wordpress templates and design the functionality whetyher it be built in or through plugins probably did it through the use of such software as dreamweaver, and possibly other PHP IDE's. So you would be reaping the benefit of their hardest work....but as Thorpe said...using templates is only right for you if you decide its right for you...
  12. you could place all html inside a txt file like cunoodle2 said...and use file_get_contents; or file(); :-)
  13. ....meaning....you need to specify a key with quotes... like PFMaBiSmAd said the first time around.... $_POST is an array, with all your form values....'submit' being a key, and the value would be anything inside "value" attribute or inside the actual input field....
  14. It would be a tad bit more complicated that that, since not all font's are embedable, so you would have to result to using GD with php to generate an image with the specified word...its how the site you specified works.... You would use a process very similar to creating a captcha... check this tutorial out to start... http://www.phpfreaks.com/tutorial/php-add-text-to-image also using functions like this.. http://us.php.net/manual/en/function.imagefttext.php
  15. http://myflexria.com/experiments/forumText.php <?PHP //loop cards function generateDecks($noofdecks){ $decks = array(); //assign variables $deck = array( 1 => "Ace of Hearts", 2 => "2 of Hearts", 3 => "3 of Hearts", 4 => "4 of Hearts", 5 => "5 of Hearts", 6 => "6 of Hearts", 7 => "7 of Hearts", 8 => "8 of Hearts", 9 => "9 of Hearts", 10 => "10 of Hearts", 11 => "Jack of Hearts", 12 => "Oueen of Hearts", 13 => "King of Hearts", 14 => "Ace of Diamonds", 15=> "2 of Diamonds", 16 => "3 of Diamonds", 17 => "4 of Diamonds", 18 => "5 of Diamonds", 19 => "6 of Diamonds", 20 => "7 of Diamonds", 21 => "8 of Diamonds", 22 => "9 of Diamonds", 23 => "10 of Diamonds", 24 => "Jack of Diamonds", 25 => "Oueen of Diamonds", 26 => "King of Diamonds", 27 => "Ace of Spades", 28=> "2 of Spades", 29 => "3 of Spades", 30 => "4 of Spades", 31 => "5 of Spades", 32 => "6 of Spades", 33 => "7 of Spades", 34 => "8 of Spades", 35 => "9 of Spades", 36 => "10 of Spades", 37 => "Jack of Spades", 38 => "Oueen of Spades", 39 => "King of Spades", 40 => "Ace of Spades", 41=> "2 of Spades", 42 => "3 of Spades", 43 => "4 of Spades", 44 => "5 of Spades", 45 => "6 of Spades", 46 => "7 of Spades", 47 => "8 of Spades", 48 => "9 of Spades", 49 => "10 of Spades", 50 => "Jack of Spades", 51 => "Oueen of Spades", 52 => "King of Spades" ); for($i = 0;$i<$noofdecks;$i++){ $decks = array_merge($decks,$deck); //assign the returned value of the function to the decks variable... } //shuffle($decks); echo '<pre>'; print_r($decks); echo '</pre>'; } generateDecks(3);
  16. you can use the double money sign.... function generateDecks($noofdecks){ $decks = array(); for($i = 0; $i < $noofdecks; $i++){ //assign variables $$i = array( 1 => "Ace of Hearts", 2 => "2 of Hearts", 3 => "3 of Hearts", 4 => "4 of Hearts", 5 => "5 of Hearts", 6 => "6 of Hearts", 7 => "7 of Hearts", 8 => "8 of Hearts", 9 => "9 of Hearts", 10 => "10 of Hearts", 11 => "Jack of Hearts", 12 => "Oueen of Hearts", 13 => "King of Hearts", 14 => "Ace of Diamonds", 15=> "2 of Diamonds", 16 => "3 of Diamonds", 17 => "4 of Diamonds", 18 => "5 of Diamonds", 19 => "6 of Diamonds", 20 => "7 of Diamonds", 21 => "8 of Diamonds", 22 => "9 of Diamonds", 23 => "10 of Diamonds", 24 => "Jack of Diamonds", 25 => "Oueen of Diamonds", 26 => "King of Diamonds", 27 => "Ace of Spades", 28=> "2 of Spades", 29 => "3 of Spades", 30 => "4 of Spades", 31 => "5 of Spades", 32 => "6 of Spades", 33 => "7 of Spades", 34 => "8 of Spades", 35 => "9 of Spades", 36 => "10 of Spades", 37 => "Jack of Spades", 38 => "Oueen of Spades", 39 => "King of Spades", 40 => "Ace of Spades", 41=> "2 of Spades", 42 => "3 of Spades", 43 => "4 of Spades", 44 => "5 of Spades", 45 => "6 of Spades", 46 => "7 of Spades", 47 => "8 of Spades", 48 => "9 of Spades", 49 => "10 of Spades", 50 => "Jack of Spades", 51 => "Oueen of Spades", 52 => "King of Spades" ); array_merge($decks,$$i); } print_r($decks); try it out...im not sure how well it will work....although i think this would fall under really bad practices... Cheers! :-)
  17. ok i glanced... and happen to catch this... <form class="cmxform" id="form1" method="get" action=""> whilst you are doing things like this... $_POST["fname"] you need to do things like this... $_GET["fname"] or change the form method. Cheers!
  18. does the file you have your php in look like this all in one file... with file name ending in ".php" <?php $textfile = fopen("iscritti.txt", "r"); while ($rigafile = fgets($textfile, 1024)){ $camporiga = explode("|", $rigafile); $idriga = $camporiga[0]; if($idriga == 3){ $cid = $camporiga[0]; $cnome = $camporiga[1]; $ccognome = $camporiga[2]; $cemail = $camporiga[4]; } } fclose($textfile); ?> <html> <form method="post" action="http://localhost/open.php"> ID: <input type="text" size="10" name="id" value="<?=$cid?>"><br> NOME: <input type="text" size="10" name="nome" value="<?=$cnome?>"><br> COGNOME: <input type="text" size="10" name="cognome" value="<?=$ccognome?>"><br> EMAIL: <input type="text" size="10" name="email" value="<?=$cemail?>"><br> <input type="submit" value="Modifica"><br> </form> </html> also try looking into functions like, file() or file_get_contents() it might make life a bit easier... :-) http://us.php.net/manual/en/function.file.php http://us.php.net/manual/en/function.file-get-contents.php
  19. <?php session_start(); include 'Utilitys/Connection.php'; include 'Utilitys/Functions.php'; if (isset($_POST['submit'])) { $role = "1"; $id = mt_rand(0, 9999999999); $time = date("F j, Y, g:i a"); $signup = date("F j, Y, g:i a"); $username = protect($_POST['Username']); $password = protect(md5($_POST['Password'])); $firstname = protect($_POST['FirstName']); $lastname = protect($_POST['LastName']); $email = protect($_POST['Email']); if (isset($role) && isset($id) && isset($time) && isset($signup) && isset($username) && isset($password) && isset($firstname) && isset($lastname) && isset($email)) { $save = "SELECT * FROM `users` WHERE username LIKE '$username'" or die (mysql_error()); $result = mysql_query($save); if (mysql_num_row($result) > 0) { $flag = "INSERT INTO `users` ('id', 'username', 'password', 'firstname', 'lastname', 'email', 'role', 'time', 'signup', 'gender') VALUES('$id', '$username', '$password', '$firstname', '$lastname', '$email', '$role', '$time', '$signup')" or die (mysql_error()); $run = mysql_query($flag); print "<p align='center'>Welcome $username,<br>You Have Now Been Register, Please <a href='Login.php'>Login</a><br>Many Thanks,<br>Admin.</p>"; } //missing closing inner if brace... else { print "<p align='center'>Please Fill All Required Fields.</p>"; } } //missing outer if end brace... else { print "<p align='center'>Sorry But That Username ($username) Already Exist's, <br> Please Try Again.</p>"; } ?> See code for adjustment & comments
  20. Any error messages ? error_reporting (E_ALL); ? Do you have any php code before the code you posted?
  21. As JD said might be some odd behaviour dealing with magik quotes? (I really don't know). - have made it a habit to favor single quotes in my php code.... Cheers!
  22. maybe if you post some of your code, some of the experienced users on this forum can aid you in finding what makes your code tick(or not in this case)....how comfortable do you feel with php and/or curl?
  23. Question for MODs/Guru's/Pro's Is there such a thing a a memory limit on this? would memory limit even apply to what OP is doing in his script?
  24. take your $_POST of $_GET variables and isert it into your database... eg $queryString = "INSERT INTO tableName (`id`,`birthday`) VALUES('',$_GET['dd']-$_GET['Month']-$_GET['Yr'])"
  25. you might say this is in violation of one of the forum rules... but you can try google for free! :-P To be honest Every mail server probably required different fields and submition variables so, if your looking for a universal curl script...looks doubtfull...google curl+php+'your mail service' and you should get some good results i hope... cheers!
×
×
  • 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.