Jump to content

wildteen88

Staff Alumni
  • Posts

    10,480
  • Joined

  • Last visited

    Never

Everything posted by wildteen88

  1. There are plenty of books/articles out there that step you through setting up Apache, PHP and MySQL manually. However *unix based OS may be a bit harder to configure as you may need to download the source code for each application and then compile each app serperatly so they can be used. However if its a Windows OS then its pretty simple to setup Apache, PHP and MySQL. Your server will be up and running within a few minutes if you correctly setup Apache and PHP.
  2. Whats a tableless table? Do you mean a tableless layout? If you want to do a tableless layout just search for CSS layouts in google.
  3. This is possible with css. Have a look at [a href=\"http://solardreamstudios.com/learn/css/footerstick/\" target=\"_blank\"]footerStick[/a] for an explanation of how to do it. Also ahve a look at [a href=\"http://www.themaninblue.com/writing/perspective/2005/08/29/\" target=\"_blank\"]footerStickAl[/a] too which is better way of doing it.
  4. If you have XAMPP then you'll want download the latest version of XAMPP rather than the standalone version of PHP. You can download the latest version of XAMPP [a href=\"http://www.apachefriends.org/en/xampp.html\" target=\"_blank\"]here[/a] Also the server you have installed XAMPP on is it a live server? ie one that is accessible via the internet? If it is I would highligh recommend you to do a manual install of Apache, PHP and MySQL rathar than using packages like XAMPP. If you do an manual install it is easier to maintain and you dont have to wait for the next version of XAMPP in order upgrade PHP to latest version. In order to update php all you need to do is overwrite the current existing files and your version of PHP is updated!
  5. the added keyword [b]return[/b] before you call the confirmation function with in the onclick attribute on you input tag, Without that your form won't submit.
  6. You might have an error in your SQL query. To find out chnage the following code:[code]$results = mysql_query($request); if($results) { echo "Registered" } else { echo "Not Registered"; }[/code] to the following: [code]$results = mysql_query($request) or die("Unable to perform query: " . $result . "<br /><br />" . mysql_error()); echo "Succesfully registered!";[/code] If there is a problem with the sql query then you'll get an [i]Unable to perform query message[/i] when you next run the code. If you dont understand the error message that may be shown you can post it here and we'll be able to help.
  7. Nope, All text displays fine for me. You have clearType turned off? ClearType should improve readability of text.
  8. If you want someone to code this for you then you might want to take a trip to the PHP Freelancing forum as thats the place where you post requests for someone to do something for you. But still what you want to do is relitively simple.
  9. Is it me or did Andy not explain how to! I will quote his post: [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]The solution is to use the [b]file_exists()[/b] function [see the php manual] to check for the presence of the file you want in (say) the root folder. If it exists, include it; if it doesn't exist check with file_exists() again in the /news folder.[/quote] Heres a link to manual that shows you how to use the [a href=\"http://uk2.php.net/manual/en/function.file-exists.php\" target=\"_blank\"]file_exists[/a] function. But any I will provide you the code: [code]//check in the root folder first if(file_exists('./' . $filename . '.php')) {     include './' . $filename . 'php'; } //if it wasn't found in the root folder then check in the news folder elseif(file_exisits('./news/' . $filename . '.php')) {     include './news/' . $filename . '.php'; } // if it couldn't be found display message else {     echo $filename . '.php could not be found in either the root folder or the news folder!'; }[/code]
  10. How is this to do with PHP? But any way. The reason why your text appears invisible is becuase you dont specify a font color. If no font color is stated then the browser will use a defualt color which black. To set a defualt color for your page you use the following css: [code]body {     color: #FFFFFF; }[/code] #FFFFFF is the hex value for white. Also you should use css to add the background image to your page with the following css in your body selector: [code]body {     color: #FFFFFF;     background-color: #000000;     background-image: url(frame_800x600.jpg);     background-repeat: no-repeat;     background-position: center; }[/code] When you apply the css above you might find that your text in your table that shows the comment may disappear. To solve this you use the following css to tell the browser to use black as the color for the text inside a table: [code]table {     color: #000000; }[/code] And you're done!! That should solve your first question.
  11. Not a bad site design. The layout is clean and readable. However I displike the font, but i see you are actually using a font called [b]Papyrus[/b] in someareas. I would suggest you use standard fonts which most computers have by defualt such as Arial, Verdana etc or change any areas that use the papyrus font to be converted into images instead, such as the headers. (h2, h3 tags). Otherwise if a computer doesnt have the papyrus font it may look bad in areas that use that font. Also the header background image looks pixelated and distored which doest look good. Prehaps use a better crisp background image for the header. Oh another suggestion would be change the menu, so it doesnt use the browsers defualt font and lower the tone of the pink on the menu. Theres a few suggestions for you to work on. ^_^
  12. You have two variables which are the same but are typed differently. The variables I am talking about are $clinica and $Clinica Notice one has a lowercase c and the other has an uppercase c PHP sees those variables as two completly different variables. PHP is case-sensitive with variablesname so if you change $Clinica to $clinica PHP should now be able to use your mysql link resource which is stored in the $clinica variable.
  13. Are you setting and using the cookies in the same piece if code? If you are this is not possible with cookies unless you refresh the page then PHP will be able to access the cookies you have just set. Also it does help if you describe whats wrong in a little more detail becuase "!it doesn't work" isn't very informative. Also incase there might be an error kicking up somewhere which is stoping setcookie from setting a cookie make sure you look at your servers error log file. You should be able get acess to your error log file from your sites control panel.
  14. This is not possible with javascript. However you might be able to "simulate" it though.
  15. Yes the PHP Tags and the SOLVED features had been removed when the forum was upgraded. This thread has been locked and unpinned.
  16. Basically what you'll want to do is submit the form to itself. Then do seperate if statments rather than if/elseif stataments. Then for each statement you check whether the field has been filled in correct, suchh as the username fieled has 5 or more characters in it. If it doesn't then you create a variavale called $error[] which is an array and stores all the errors inside it. Then when you get to the end of all the if statements you use a foreach loop which echos out all the errors above the form. If there is no errors in the errors array then you can use the data. Heres an example of what I mean: [code]<?php if(isset($_POST['submit'])) {     //check that the username is atleast 5 chars long     if(strlen($_POST['user']) < 5)     {         //setup $error array         $error[] = "The username choosen is an invalid length, please use a username that is atleast 5 characters";     }     //no do a seperate if statement to check whether the email address is valid and matches the secound email address     if(strpos($_POST['email1'], '@') === false)     {         $error[] = "Your email address is invalid, please supply a valid email address";     }     elseif($_POST['email1'] != $_POST['email2'])     {         $error[] = "The email address supplied does not match!";     }     if(isset($error))     {         echo "<b>We have detected one or more errors with the information you have supplied:</b>\n<ul>";         foreach($error as $k => $v)         {             echo '<li>' . $v . "</li>\n";         }         echo "</ul>\n";     }     else     {         echo "No errors where found! Validation successful";         exit;     } } ?> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">   Username: <input type="text" name="user" value="<?php echo (isset($_POST['user']) ? $_POST['user'] : '') ?>" /><br />   Email Address: <input type="text" name="email1" value="<?php echo (isset($_POST['email1']) ? $_POST['email1'] : '') ?>" /><br />   Confirm Email: <input type="text" name="email2" value="<?php echo (isset($_POST['email2']) ? $_POST['email2'] : '') ?>" /><br />   <input type="submit" name="submit" value="Register" /> </form>[/code] Note the validation checks used in the above script are basic which are there just to demostrate what I mean.
  17. Are you trying to check whether $identy is equal to or greate than a certain number in your if statements? If you are you are doing it the wrong way! Inseat compering the current value of $identy with a value you are assigning a value to $identy! one equal (=) sign is the assignment operator two equal (==) signs is the comparision operator Now since you are using an = sign in all your if statements they are doing to be returning true as PHP was successfull in assigning $identy with the value ">9", ">8", ">7" etc in every iuf statement you had Now if you want to compare something you'll want to do this: [code]if($foo == $bar) {     // true } else {     // false }[/code] So you will want to add an extra = sign in each if statement. But I think what you are doing is seeing whether $identy is equal or greather than something? If you are then you'll want to do this: [code]if($identy >= "9") {     //do something }[/code] Also you might want to look in to [a href=\"http://uk2.php.net/manual/en/control-structures.elseif.php\" target=\"_blank\"]if/elseif[/a] statements. However I belive you can do away with all the if statement and use just one query!
  18. What that error is saying is that your PHP setup hasn't got PHP setup to use the mysql extension. You need to enable the mysql extensions in the php.ini file in order for PHP to use the mysql functions.
  19. here is my results: Run1 [code]Option 1 : 0.0095610618591309 Option 2 : 0.1908130645752[/code] Run2 [code]Option 1 : 0.073547124862671 Option 2 : 0.0056939125061035[/code] Run3 [code]Option 1 : 0.0068960189819336 Option 2 : 0.029973983764648[/code] Run4 [code]Option 1 : 0.0096101760864258 Option 2 : 0.065150022506714[/code] Run5 [code]Option 1 : 0.0096230506896973 Option 2 : 0.14893484115601[/code] Average [code]Option 1 : 0.02184748649597172 Option 2 : 0.0881131649017351[/code] I ran the script 5 times on my home PC that has Apache2 andPHP5 install with an Intel P4 3.06Ghz Processor running XP Home Everyone will have different results as everone will PHP setup will not be the same and everyone will be running PHP different system setups so the results are going to be completly different.
  20. Then you might want to read up on [a href=\"http://uk.php.net/manual/en/language.variables.scope.php\" target=\"_blank\"]variable scope[/a]
  21. Hi read my post [a href=\"http://www.phpfreaks.com/forums/index.php?showtopic=87276\" target=\"_blank\"]here[/a] should help you. Ignore the bits about apache.
  22. You simply forgot to a " before ; on line 250. Your line 250 looks like this [i]);[/i] It should be: [i])[!--coloro:red--][span style=\"color:red\"][!--/coloro--][b]"[/b][!--colorc--][/span][!--/colorc--];[/i]
  23. You can use mysql_*() functions inside of any other function! If mysql_query is failing you most probably have an error within your query. Also within your function you are using variables such as $database and $Con which seemt to be variables set in the Con.php file which is being required. You will need to make these variables global in order for PHP to access them from your function. So change your code to the following: [code]function fun() { global $database, $Con; mysql_select_db($database, $Con); $query = "SELECT enfAP FROM Enfermera where enfCod=1"; $rs = mysql_query($query, $Con) or die(mysql_error()); //Here is where the execution stops $row = mysql_fetch_assoc($rs); echo $row['Col1']; }[/code]
  24. You should check whether id isset in the url first before useing the switch statement like so: [code]<?php //check that id isset if(isset($id)) {     switch($id)     {         case "privacy":             include('privacy.txt');         break;         case "terms":             include('terms.txt');         break;     } } else // if it isn't include main.txt (defualt) {     include('main.txt'); } ?>[/code]
  25. Please read my thread [a href=\"http://www.phpfreaks.com/forums/index.php?showtopic=87276\" target=\"_blank\"]here[/a]
×
×
  • 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.