Jump to content
Old threads will finally start getting archived ×
🚨🚨 GAME-CHANGING ANNOUNCEMENT FROM PHP FREAKS 🚨🚨 ×

Search the Community

Showing results for tags 'if'.

  • Search By Tags

    • if ×
    Type tags separated by commas.
  • Search By Author

Content Type



Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Found 24 results

  1. Hi, Freaks. I've got a quick question I'd like to ask out of curiosity I coded a simple pagination functionality last night. It's nothing intricate. The page it's for pulls a large amount of data and is displayed 10 rows at a time. To determine which data to display it uses a simple $_Get[...
  2. Hi guys, I have this script I am running, http://pastebin.com/NR1A03hY, works perfectly and does everything I need it to do. The only thing is the redirect at the bottom of the script does not work if line 40 is true. I think I have a problem with my foreach loop and the if statements...
  3. Trying to simplify my code to something like: if($_SESSION['url'] != 'http://www.golden-wand.com/Pages/admin.php'||'http://www.golden-wand.com/Pages/admin-test.php') This is what works that I would like simplified: <!---------------------------------- ADMIN FUNCTIONS START --------------------...
  4. HI Guys, Newbie question Can anybody help me with what is wrong with my IF Statement Please: <td>if ($record['docs_available'] = "1"){ echo ".$record['status_name'].";} else {echo ".$record['docs_available'].";} </td thanks in advance
  5. Hi all, Sorry if this isnt the right place to ask this. I have tried many other forums and have had no luck. I am learning programming for Raspberry Pi. Currently, I can read the output of a pin (GPIO) on the circuit board as such: <?php exec ( "gpio read 7", $status ); print_r ( $status...
  6. I'm a PHP beginner - I'm not sure what is wrong with this code. The problem: When $qotw is equal to 1 or when it is equal to 2, neither statement is being executed (see code below). I am not getting any errors. What I tried: I tried putting if($qotw = '1') instead of if(qotw == '1') and if(...
  7. Got a question. Hope not worked with PHP too long so, I'm trying to print/echo the date but I don't understand what the hell the date is that it's sourcing. My code is; <!DOCTYPE html> <html> <head></head> <body> <?php $t=date("H"); if ($t<"15") { print "Have a good Morning"; } else if (...
  8. Some of the search results have snippets and some do not so I need an if statement inserted for the cases there aren't any. Seems that when I try to insert an if statement it gets picked up as html. What would be the best way to insert an if here? $Blekko = array ("<a href=\"{$item->url}\">...
  9. I am writting a document management application which is running a very large if statement, similar to if(($filetype == jpeg)||(filetype == gif)){ $type = "Image"; }elseif... and so on it's about 180 lines. The Problem is I can do it in an array as well, an array will be less code. but is it f...
  10. The first block of code is what i want to use since i know it works, but i dont know how to use it with the code already there. <?php if (strpos($_SERVER['REQUEST_URI'], 'upload.php') == false) { echo 'the stuff below is removed, or if the URL is something else, its not removed' ?> This code i...
  11. I need a list for a form that will be used to register children to their legal guardian. The list is a drop down menu, which will eventually be sorted alphabetically, if php can do that . However, the current problem is that there are single parents out there, way current way the code is set up work...
  12. <?php $noError = 0; echo"Test 1 Passed</br>"; ?> <?php include 'f2.php';?> <?php echo"Test 2 Passed</br>"; if($noError = 0) { echo"Test 3 Passed"; } ?>
  13. Hello guys, I have a slight problem with a booking form i made. Booking form is for minicab booking so price calculation is involved. The booking form was working fine with php4 enabled hosting but i have problem with php5 hosting. Script doesnt pass the varible after if conditions are mathced....
  14. Hello I'm new in this forum but i hope you understand what I trying to do. <?php $theanswer = 4; $answer = $_POST['answer']; if(isset($_POST['button'])){ if ($theanswer = $answer){ echo "Right the answer is 4<br>"; } else { echo "Wrong try again!"; } } ?> 2 + 2 is? <form method="post"...
  15. So I'm just learning PHP and MySQL for the first time, and I've been doing really well. I have a lot of experience with HTML and C++ so a lot of concepts are very familiar. I'm currently using if { to determine whether or not an HTML form field has any data in it or not. If either of two fields are...
  16. If ($Hoff == 'Nelspruit') || ($Hoff == 'Hoedspruit') || ($Hoff == 'Klaserie') || ($Hoff == 'Bushbuck Ridge') || ($Hoff == 'Hazyview') || ($Hoff == 'Graskop') OR ($Hoff == 'Sabie') || ($Hoff == 'Lydenburg') || ($Hoff == 'Pilgrims Rest') || ($Hoff == 'Barberton') || ($Hoff == 'Waterval Boven') || ($Ho...
  17. Hi, I am working on a PHP file and need it to open a URL and if there is a certain word or phrase on the web page then open a second URL. If the text is not there, then I need the first URL to continually open until the text is found. I would imagine this is pretty simple, something like an...
  18. Hello All, First let me say, happy holidays! Second, I am glad to see that you are all still here. I am having trouble passing a variable through the url, getting it and then determining the correct query with it. For example: $find = $_GET['x']; if ($find = 'y') { sql = "SELEC...
  19. Hi all, i am fairly new with php and i am running into a problem with a php function. It is very basic but i've got something wrong here. It is a function in wordpress that needs to analyze the post and extract the category. For every category another value needs to be returned. My code is:...
  20. Hi folks, relative newbie so my code wont be pretty, however... This one has me stumped. I have written some PHP to change the background colour of a cell in a table based on a variable. The code is as follows: // Convert Summer 8 Grade to a number value if ($row['Sum8']=='1a') {...
  21. Hello All, If I have a newsletter process script with name and email, is there a way to identify if the email is an email address? For example johndoe@gmail.com. I kind of want to think of a way to identify if it is a real name as well. Maybe just ask for first and last name. Thanks,
  22. Hi I am currenly doing a project where i am required to send some values to secure http via post request..I am using Curl for this and that works fine, what I am stuck on is how to retrieve stored database values and send each one individually in a loop to the specified url in the curl script....
  23. HI, I am a beginner at programing and I have to do this project where it is asking me to validate any ISBN 13 number. I know how to set up the input page, but I am having or you could say no Idea how to validate a number if user inputs data in the input page. I have some could below that I thin...
  24. Hi everyone ! I'm new here... So I got a little problem with creating my first website. I want to include files with the content of my subpages to the main index file. At the first I made a simple solution with switch. Where the urls to the files in the menu look like: href="index.php?pa...
×
×
  • 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.