Jump to content

Search the Community

Showing results for tags 'PHP'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








  1. BACKGROUND: I have a confirmation page to which I would like to pass the values of two PHP variables via PHP's header( ) function. QUESTION: Can this be done with normal query statement say something on the following order: header('Location: ../../gate_confirmation.html?name=w3schools&msg=msg_success'); Roddy
  2. BACKGROUND: I am in the process of writing a class that will match and update rows in a MySQL data base. The field that contains the values against which a match is to be discovered must be indefinite. The values that it can contain are either 0 or 1 as defined by an ENUM field type. I know both the desired field and value before the matching routine commences. I want the UPDATE routine to set the value of the field to its opposite: 0 => 1 or 1 => 0. CURRENT STATE OF THE CODE: <?php class VeriFirm { private $mysqli_obj; private $username; private $email; priva
  3. BACKGROUND: In the past I have retrieved an HTTPRequest via the $_GET superglobal, used the data from the superglobal to access a MySQL database, and from the thus retrieved data, generated an array of parameter values that I then assigned to a local array. This local array was then assigned to a $_SESSION variable where it was used for other purposes. This time, I would like to make the routing of data less circuitous. QUESTION: Does the following expression make sense? $_SESSION = $_GET; Roddy
  4. BACKGROUND: I have learned to keep a log that increases incrementally with the generation of each new newsletter and podcast. 1) Read the Current Log Value $file = './episode_index.txt'; if (file_exists($file)) { $json_str = file_get_contents($file); $episode_no = json_decode($json_str, true); $number = $episode_no['episode_no']; $new_episode = $number + 1; } else { echo 'The desired file either does not exist, or does not exist in the indicated location.'; } 2) Take Some Action and Update the Log Value Incrementally if (!is_blank($_POST['letter_no'])) { $episod
  5. BACKGROUND: I have an HTML template that contains a variety of template variables designated by the following pair of delimiters %varname%. In most cases there is a one-to-one correspondence between the values of a set of PHP variables gathered on a PHP processing page and the template variables found on the HTML template. The routine for populating the template variables with values is captured in the following code snippet of a very simple PHP class designed for generating templates. function replace_tags($tags) { if (sizeof($tags) > 0) { foreach
  6. hello all! i was trying to run another query inside a while loop of a prepared statement. $qs = $_POST['queryString']."%"; $ledq = $mysqli->prepare("SELECT name, fullid aid, ob FROM account WHERE cid='$cid' AND name LIKE ? AND ac_id IN ('$q') ORDER BY name LIMIT 20"); if (!$ledq) { echo "Error: " . $mysqli->error; } else { $ledq->bind_param('s', $qs); $ledq->execute(); $ledq->bind_result($name, $aid, $ob); $ledq->store_result(); while ($ledq->fetch()) { $balq = $mysqli->query("SELECT SUM(debit) debit, SUM(credit) credit FROM .................
  7. hello all! i was trying to get max value from a mysql query derived values but i could not succeed. please guide what i made mistake. below is the code i tried. in this after fetching data from mysql table, i made some calculations and derived data like this ////////////////// 7474.776.89578.3 ////////////////////////// which actually contains 5 values ( 74,74.7,76.8,95,78.3 ) what i want is to select the number 95. what is the proper method? thank u in advance. $cid = 2; $subid = 10; $clas = 'PG'; $highmq = $mysqli->query("SELECT marktheor
  8. I was trying to open this ( https://github.com/filipac/Free-Torrent-Source/blob/master/mytorrents.php ) but got error. Can anyone guide me how to open this resource ? Edit: It says "Error, Permission Denied". Can u please guide me to open this file. I have Xampp as local server and know how to run it. Downlad and run this resource and please say me steps
  9. I am new to web development, so be patient please I am working with a tab navigation system. It happens to be bootstrap, but this question is not specific to bootstrap. There are four tabs; for the sake of simplicity we will call them tabs "A", "B", "C", and "D." I have a single SQL table and one of the columns --we will call it "Letter"-- identifies each row with one of the four letters. When a user clicks on "A" tab, they should see all the rows where "Letter" = "A". The same for tabs "B", "C", and "D." Right now I am running four separate queries, one for each tab. This seem
  10. BACKGROUND: I have a PHP generator that creates a newsletter from an HTML template with data obtained from a MySQL database. My current plan is to include with the generator an automated mailing function using PHPMailer. I intend to use this generator to consummate to kinds of mailing functions -- mass and individual. The individual mailing: when a user opens an account he automatically receives an automatically generated newsletter with information designed for first users. In this newsletter he has the option of subscribing on a more permanent basis or declining further receipt of futur
  11. Ok bare with me because I have no idea what this is actually called. If someone knows I will update the title. I am working on a site that will act as an out-of-game marketplace for in-game items. I want to ensure that the player is within the zone of the market in-game so I need an easy way to generate an array of valid coordinates the player could be within to access the market. Ideally i would like to run a function with a parameter specifying the radius of a square and another of the player's current geoID. Basic geometry would help if the geoID's were, in my mind, easier to predict.
  12. BACKGROUND: It appears that there are few problems in web development that do not have multiple solutions. My problem is to decide which solution best suits my needs. I have a confirmation email that sends a name, hash, and email address via an HTTP REQUEST using the $_GET superglobal to a PHP file that matches the hash with an entry in a newsletter roster table. If the match succeeds the value of the status variable is changed from 0 to 1. Before the hash is sent to the roster table it is sanitized using the MySQLi real_escape_string( ) function. Elsewhere on my website I use the PHP
  13. hello all! greetings! i'm trying to fetch data from a prepared statement and using some variables to pass the query $wh = "class=? AND section=?"; $param = "'ss', $clas, $sec"; $stmt = $mysqli->prepare("SELECT CONCAT(fname, ' ', lname) AS name, fullid, roll FROM students WHERE $wh AND ay='$ay' AND cid='$cid'"); if (!$stmt->bind_param($param)) { echo "Bind Error: " . $stmt->error; } ?> this is showing error but only "Bind Error:" not the "$stmt->error". i tried to echo $wh and $param value also and they give the same value as i intend. why
  14. Hy, I'am fresh in web Developement and I'am wondering why sending data via forms opens the php-file automaticly instead of working with the data in the backround. <table class="table table-bordered"> <form action="php/interface.php" method="post"> <thead> <tr> <th><input type="submit" ></th> <th><p>Serie: <input type="text" name="serie" /></p></th> <th><p>Korn: <input type="text" name="korn" /></p></th> </tr> </thead> </fo
  15. I’m facing problem in downloading two combined images on div where the code should be in html format. I want to download the div images in a local computer in the image format. Even, I want to take the screenshot of the two combined images simultaneously, please post me any proper solution for that.
  16. I cant understand why this is not working.. I compare two strings, if they match then do something.. I'm getting values 1 for the first and 8 for the second?? carquest-clearvape carquest-carquest if (strcmp($_SESSION['username'],$username)==0) echo $this->amount($offer['amount'], $listing['currency']); else echo $this->amount("*****", $listing['currency']);
  17. GREETING: I hope that everyone who celebrated the American holiday of Thanksgiving this past week spent a wonderful holiday full of cheer, good food and drink, and restored family ties and friendships. My celebration was short, alone, but very well spent. And, in the quiet of the office, abandoned by nearly everyone for the holiday break, I was able to finish nearly three weeks of study, investigation, and experimentation with the grammar of the MySQL database. You may discover the results by clicking on any direct reference to a specific podcast on the Grammar Captive Weekly Podcast webpa
  18. BACKGROUND: Good ideas are sometimes like luck, they come in streaks. Thanks to the experiential wisdom of this forum and those around me in the Galvanize collective workspace, I have decided to tarry a little longer with the reconstruction of my data base. Indeed, I have learned a new term -- normalization. What before I intended to achieve with row duplication I hope now to achieve with simple updates. In order to achieve this important structural change and still retain the benefits of the old structure, I must disengage one of my form's <fieldset>s and create from it a new for
  19. <!DOCTYPE HTML> <html> <head> <style> .error {color: #FF0000;} </style> </head> <body> <?php /** * Note that the salt here is randomly generated. * Never use a static salt or one that is not randomly generated. * * For the VAST majority of use-cases, let password_hash generate the salt randomly for you */ // define variables and set to empty values $usernameErr = $passwordErr = $firstnameErr = $emailErr = $genderErr = $websiteErr = ""; $username = $password = $firstname = $email = $gender = $comment = $website = ""; if ($_SERVER["REQUEST_M
  20. Hello All, This is my first post as I am new to PHP. I am learning how to develop web apps for education using PHP, CSS and HTML. I dont know any of those languages. My question is what does the following code do/mean?: $page = ($_GET['page'])
  21. I think it would be great to have small group projects .We could build login system; with air tight state of the art security, photo gallary's, audio gallery's. I think it would be a great tool for learning web development . Just a thought.
  22. Im wondering if there is a way to to automaticly register a php file , so it wont show up when reading a directory. Doing this || $file == "somefile.php" after ten or twenty time gets to be grievious
  23. I've been using HTML_CodeSniffer to do accessibility testing of web pages. I have been successful reducing errors to 0 but I get lots of warnings about color ratio, text on background images. My page is primarily white background with black or blue (links) text. Is there something I can do to get rid of the warning? If you are familiar with accessibility test, do warnings count against you? Basically, I'm ignoring warnings.
  24. Hello I need to remove a certain part on my page. Here is the link of the page. http://communityofsol.gr/?page_id=139 You see a brown canvas. In the canvas it says "Παροχές υπηρεσιών σε απόρους" , Below it, it says Home / Παροχές υπηρεσιών σε απόρους. I need to remove everything after Home ( what you see in bold). PLEASE assist me because I have a deadline and I need to do it! Thank you in advance!
  25. This script shows the fetched data in a modify form. In the old situation I used rec_num wich was corresponding to the record number in the database.table For security reasons I added a uniqid column to the table. So not like under with an input hidden attribute for uniqid. If possible I would like it to be stored in a session variable. This is doable like above, but outside the foreach loop only the last value is stored. How to connect every single uniqid value (for multiple records!) to the separated rec_num without users being able to see
  • Create New...