Jump to content

Search the Community

Showing results for tags 'data'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (Dreamweaver, Zend, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 22 results

  1. I cannot seem to figure this bit out. I'm trying to load data from an xml file depending on what the value of a url parameter is. I have an attribute set in my xml, but cannot seem to figure out how to go about this. I've looked at several examples of getting the attribute so I'm not sure where I am wrong since I haven't come across an example using url parameters to determine what data should be fetched. Here is what I have so far. An example of my xml file. There will be more records of piercing in this file. <piercings> <piercing id="default"> <title>Piercing Not Specified</title> <names>N/A</names> <gauge>0</gauge> <healing>0</healing> <risk>None</risk> <description>You must first choose a specific piercing from the menu to view information.</description> <aftercare>Aftercare tips will be available once you choose a specific piercing from the menu.</aftercare> <avoid>Things you should avoid will be listed once a specific piercing has been chosen.</avoid> <img>http://via.placeholder.com/350/000000/676767?text=Not%20Specified</img> <additionalimgs> <additionalimg>http://via.placeholder.com/350/000000/676767?text=Not%20Specified</additionalimg> </additionalimgs> </piercing> <piercing id="incomplete"> <title>Listing Incomplete</title> <names>N/A</names> <gauge>0</gauge> <healing>0</healing> <risk>None</risk> <description>The listing for this piercing is incomplete. Once completed the data will appear on this page. Please check back later.</description> <aftercare>Aftercare tips will be available once you the listing is complete.</aftercare> <avoid>Things you should avoid will be listed once the listing is complete.</avoid> <img>http://via.placeholder.com/350/000000/676767?text=Incomplete</img> <additionalimgs> <additionalimg>http://via.placeholder.com/350/000000/676767?text=Incomplete</additionalimg> </additionalimgs> </piercing> <piercing id="antieyebrow"> <title>Anti-Eyebrow</title> <names>Anti-Eyebrow, Teardrop</names> <gauge>16</gauge> <healing>6 - 8</healing> <risk>Rejection/Migration, Scarring</risk> <description>The anti-eyebrow piercing is located on the upper side of the cheek bone right below the orbital socket of the eye. This piercing is most commonly pierced using a 16 gauge curved barbell or custom bent jewelry. This piercing may also be referred to as a teardrop piercing.</description> <aftercare>It is recommended with this piercing to clean twice a day using saline solution or antibacterial soap. Do not overclean. Irritation from overcleaning can result in migration of the piercing. </aftercare> <avoid>Using rubbing alchohol as a cleaner. Changing the jewelry for atleast 3 weeks although recommended to wait until the piercing is fully healed. Pools/hot tubs especially those with chemical cleaners in them. Swimming holes, creeks, rivers, etc. due to bacterial exposure risk.</avoid> <img>http://jessetoxik.com/img/display/stock/antieyebrow_default.jpg</img> <additionalimgs> <additionalimg>http://jessetoxik.com/img/thumb/stock/antieyebrow_1.jpg</additionalimg> <additionalimg>http://jessetoxik.com/img/thumb/stock/antieyebrow_2.jpg</additionalimg> <additionalimg>http://jessetoxik.com/img/thumb/stock/antieyebrow_3.jpg</additionalimg> </additionalimgs> </piercing> </piercings> So for this one I am trying to pull all of the data for the piercing with the attribute of id="antieyebrow". Here is what I tried to retrieve that. URL: http://example.com/piercing.php?location=antieyebrow. if (file_exists($_SERVER['DOCUMENT_ROOT'].'/info/piercing/piercings.xml')) { $piercingxml = simplexml_load_file($_SERVER['DOCUMENT_ROOT'].'/info/piercing/piercings.xml'); $location = $_GET['location']; $piercingid = $piercingxml['id']; } else { $piercingxml = simplexml_load_file($_SERVER['DOCUMENT_ROOT'].'/info/piercing/default.xml'); $location = "default"; } And finally to display the data onto the page: echo $piercingxml->$piercingid[$location]->title; So far nothing from the file is being displayed. How do I accomplish this? Any help as to where I went wrong would be greatly appreciated.
  2. NasimUddinAhmmad

    Php Search MySql

    Hello friends, I am a novice in php. Though I create 2 scripts: 1. students registration form 2. search students by Registration Number Our students' Registration Numbers are as follows: nifeA001, nifeA002 & so on... But when someone enter just "nife" or "n" or "A" etc all the students's data is showing. I want that students can search data by entering only Full Registration Number not a Part. I am placing the search.php code below. Please help me out.... ----------------- Search.php ------------------ <?php mysql_connect("localhost", "root", "") or die("could not connect"); mysql_select_db("student") or die("could not connect"); //collect if(isset($_POST['search'])) { $searchq = $_POST['search']; $searchq = preg_replace("#[^0-9a-z]#i", "", $searchq); //here $query = mysql_query("SELECT * FROM user WHERE registration LIKE '%$searchq%'") or die("could not search!"); $count = mysql_num_rows($query); if($count == 0){ $output = 'There was no search results!'; }else{ while($row = mysql_fetch_array($query)) { $fname = $row['firstname']; $lname = $row['surname']; $id = $row['registration']; $output .= '<div> '.$id.' '.$fname.' '.$lname.'</div>'; } } } ?> <html> <head> </head> <body> <form action="form.php" method="post"> <input type="text" name="search" placeholder="search for students.." <input type="submit" value=">>" /> </form> <?php print("$output");?> </body> </html>
  3. I am new to coding and working on a website, I have data coming from my data base in this format to my product description area: Length=8 in|Width=0.180 in|Thickness=|Size Group=|Bundle Diam=1.9000 in [Max]|Material=Nylon|Color=Weather Resistant I need to somehow convert the data to this format in an HTML table in the same area: Length 8 in Width 0.180 in Thickness Size Group Bundle Diam 1.9000 in [Max] |Material=Nylon Color=Weather Resistant I know it seems friggin easy, but I am stumped! Any help will be appreciated!
  4. Say there is a complex opt in process where people start to enter their data but certain questions stop them where they close out of the page. They already entered their data and I feel there is a way to grab it and post it to mysql even though they do not click submit. How would this be done? A super simple example (proof of concept) or a link to a tutorial would be very useful.
  5. Here's the code that deals with the client side: search.php <?php //testing if data is sent ok echo "<h1>Hello</h1><br>" . $_GET['search']; ?> This is the link I get after sending foo. http://www.family-line.dx.am/Community/index.php?&search=foo Is that mean it was sent, but I'm not processing it correctly? I'm new to the whole AJAX thing.
  6. I have an html form that inserts a record into database. I also have a an html edit form that retrieves the data from the database. Normally everything works. But I just noticed that I have an issue if I use double quotes in the form field. It'll insert into the database fine. The problem arises when outputting the variable in the form field. If I echo it outside the form field, it'll show up fine with the double quotes. But inside the field, I only geta partial string. For eg. $variable_input = '5 3/4" Glitter Concealed Platform Pump'; The above will insert to the database. But if I retrieve it in the form field below, it'll return with one number only. <input type="text" name="title" value="5" /> Is there a way to fix the variable output of the wording that includes the double quotes?
  7. Hi, I am a curious fellow just beginning to use PHP. I understand the basics of what the $_GET and $_POST superglobals do, and how we can use them to retrieve data after form submission. I also know that since $_GET and $_POST are just associate arrays, we can create our own values in both $_GET and $_POST by writing statements like $_POST['variable'] = "value". I am wondering if it is at all possible to send data beyond form data by adding new key/value pairs into $_GET and $_POST. So for example, if I had a form that transferred username/password through Post, would it be possible for me to include further data by just saying $_POST['formtype'] = "house_insurance_form"? Basically what I'm getting at is trying to physically add your own data to $_POST or $_GET that you could pull from the next page where the form redirects to. In other words, can I send data beyond form data using these superglobals? I know I can do this with $_SESSION, but could I do it through $_POST or $_GET? I haven't been able to accomplish this, and I was just wondering if someone could give me an in-depth explanation of how this might work or how this is not possible. I would really really really appreciate it. Best Regards, -Sky
  8. Dustin45309

    Form Posting

    I've been trying to work on a form in PHP. I've got it all set up and submitting but the only problem is that I try to display the data back on the page for testing purposes but every time I hit submit, it empties the form with no results. I've written my code as follows: <!DOCTYPE html> <head> <link rel="stylesheet" type="text/css" href="styling.css"> </head> <body> <form action="registerplayer.php" action="POST"> <p>First Name:<input type='text' name='firstName'></p> <p>Last Name:<input type='text' name='lastName'></p> <p>Username:<input type='text' name='username'></p> <p>Password:<input type='text' name='password'></p> <p><input type='submit' value='Submit'></p> </form> <?php if(isset($_POST["firttName"]) && isset($_POST["lastName"]) && isset($_POST["username"]) && isset($_POST["password"])) { $firstname = $_POST["firstName"]; $lastname = $_POST["lastName"]; $username = $_POST["username"]; $password = $_POST["password"]; echo "<p>Name: " . $firstname . " " . $lastname . "\nUsername: " . $username . "\nPassword: " . $password . "</p>"; } ?> </body></html> Anyone know what I'm not seeing here? I've been working on this for a while now.
  9. Sucrose

    cURL Crawling Data

    I'm using cURL to crawl and scrape data from a website. This website contains tables with rows of data. When I send a cURL POST for the underlying data at a specific row(A), it will return the expected data. But when I move to the second row(B), the data returns blank or specifically, a tons of spaces (or nbsp's.) When I access the cURL's POST location by browser, I can see (B)'s data. The only difference in the 2 POST's are location ID's for the data. I don't think it's a problem with JavaScript as I can successfully return data from row (A) as I mentioned. Website I'm trying to crawl: https://mycpa.cpa.state.tx.us/up/Search.jsp Working POST URL(A): https://mycpa.cpa.state.tx.us/up/searchresults.do?d-49216-p=&d-49216-s=&how=&last=bales&other=&d-49216-o=&zip=&_chk=74170700611986R2ZZZZ26&which=View+Details Non-working POST URL(B): https://mycpa.cpa.state.tx.us/up/searchresults.do?d-49216-p=&d-49216-s=&how=&last=bales&other=&d-49216-o=&zip=&_chk=74600015611995R1AC081084&which=View+Details Interestingly, you can combine the data location ID's to show more than 1 set of data per page. When trying this method, the first set of data(A) is displayed and the second(B) is shown as spaces (or nbsp.) Combined POST URL: https://mycpa.cpa.state.tx.us/up/searchresults.do?d-49216-p=&d-49216-s=&how=&last=bales&other=&d-49216-o=&zip=&_chk=74170700611986R2ZZZZ26&_chk=74600015611995R1AC081084&which=View+Details
  10. The code in attached file is not working for me. and i am failed to find any mistake. Anyone help me please. deletedept.php
  11. Hi, I have a PHP script using the cURL function. This script send the data by a web service. It works often without problem. Sometimes, he sent a double data : same data by two times. I checked the log file this script (by curl_getinfo) on "total_time" When this script works correctly (it send the data only one time) : the total_time is less than 6 second. but when the total_time is more than 7 second, (this is a casual/occasional situation), my script send same data by two times so it is double data! So the web service send the ACK(Acknowledgment) which takes a long time (more than 7 second) and then, the TCP send again same data to a web service. How can I avoid this doubling ? By increasing this time waiting / time limit ? How can I define this time limit for 12 second? Could you help me : Thanks
  12. Hi, I have a json data, below which contains an item with tax: "date": "2015-05-05 12:41", "shop": "Toto", "products": [ { "price": "2.00", "quantity": "1", "description": "chocolat", "tax": [ { "price": "1.00", "quantity": "1", "description": "tax1" }, { "price": "2.00", "quantity": "1", "description": "tax2" } ] } ] } I am able to calculate the price ($amountAll) with the following code: $datajs = "myJsonSimple2.json"; $datajs = file_get_contents($datajs); $decodageDatajs = json_decode($datajs); $dateBiling = $decodageDatajs->date; $shopName = $decodageDatajs->shop; foreach ($decodageDatajs->products as $obj) { $ItemPrice = $obj->price; $ItemQuantity = $obj->quantity; $ItemDescription = $obj->description; $taxes = (array)$obj->tax; $taxesPrice1 = !empty($taxes[0]) ? $taxes[0]->price : 0.00; $taxesPrice2 = !empty($taxes[1]) ? $taxes[1]->price : 0.00; $taxesQuantity1 = !empty($taxes[0]) ? $taxes[0]->quantity : 0; $taxesQuantity2 = !empty($taxes[1]) ? $taxes[1]->quantity : 0; $taxesDescription1 = !empty($taxes[0]) ? $taxes[0]->description : '1er tax null'; $taxesDescription2 = !empty($taxes[1]) ? $taxes[1]->description : '2e tax null'; $amountAll = $ItemPrice * $ItemQuantity + $taxesPrice1 + $taxesPrice2; } But how I calculate if there are several items (2 or 3 or 5...) { "date": "2015-05-05 12:41", "shop": "Toto", "products": [ { "price": "2.00", "quantity": "1", "description": "chocolat", "tax": [ { "price": "1.00", "quantity": "1", "description": "tax1" }, { "price": "2.00", "quantity": "1", "description": "tax2" } ] }, { "price": "3.00", "quantity": "1", "description": "bonbon", "tax": [ { "price": "2.00", "quantity": "1", "description": "tax1" }, { "price": "3.00", "quantity": "1", "description": "tax2" } ] }, { "price": "2.00", "quantity": "1", "description": "gateaux", "tax": [ { "price": "1.00", "quantity": "1", "description": "tax1" }, { "price": "2.00", "quantity": "1", "description": "tax2" } ] } ] } I need like as : $amountAll = $ItemPrice1 * $ItemQuantity1 + $ItemPrice2 * $ItemQuantity2 + $ItemPrice3 * $ItemQuantity3 + $taxesPrice1a + $taxesPrice2a + $taxesPrice1b + $taxesPrice2b + $taxesPrice1c + $taxesPrice2c; but this is wrong : I must counter and use while statement but I don,t know how I can write ? $calculeItems = count($decodageDatajs->products); $i = 0; while ($i < $calculeItems) { foreach ($decodageDatajs->products as $obj) { $ItemPrice = $obj->price; $ItemQuantity = $obj->quantity; $ItemDescription = $obj->description; $taxes = (array)$obj->tax; $taxesPrice1 = !empty($taxes[0]) ? $taxes[0]->price : 0.00; $taxesPrice2 = !empty($taxes[1]) ? $taxes[1]->price : 0.00; $taxesQuantity1 = !empty($taxes[0]) ? $taxes[0]->quantity : 0; $taxesQuantity2 = !empty($taxes[1]) ? $taxes[1]->quantity : 0; $taxesDescription1 = !empty($taxes[0]) ? $taxes[0]->description : '1er tax null'; $taxesDescription2 = !empty($taxes[1]) ? $taxes[1]->description : '2e tax null'; $amountAll = $ItemPrice * $ItemQuantity + $taxesPrice1 + $taxesPrice2; /* this si wrong !!!!! $amountAll = $ItemPrice1 * $ItemQuantity1 + $ItemPrice2 * $ItemQuantity2 + $ItemPrice3 * $ItemQuantity3 + $taxesPrice1a + $taxesPrice2a + $taxesPrice1b + $taxesPrice2b + $taxesPrice1c + $taxesPrice2c; */ } $i++; } can you help me please Thanks
  13. Folks, I found this piece of code on my notes. Cannot remember where I grabbed it from. It is supposed to fetch a page and grab it's meta details and display them on screen. Question is: What is this error I am getting ? Fatal error: Uncaught TypeError: DOMDocument::loadHTML() expects parameter 1 to be string, boolean given in C:\xampp\htdocs\curl\filter.php:31 Stack trace: #0 C:\xampp\htdocs\curl\filter.php(31): DOMDocument->loadHTML(false) #1 {main} thrown in C:\xampp\htdocs\curl\filter.php on line 31 <?php /* ERROR HANDLING */ declare(strict_types=1); ini_set('display_errors', '1'); ini_set('display_startup_errors', '1'); error_reporting(E_ALL); mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT); function file_get_contents_curl($url) { $ch = curl_init(); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); $data = curl_exec($ch); curl_close($ch); return $data; } $html = file_get_contents_curl("https://www.google.com/search?q=dirty+harry&oq=dirty+harry&aqs=chrome..69i57.2604j0j7&sourceid=chrome&ie=UTF-8"); //parsing begins here: $doc = new DOMDocument(); @$doc->loadHTML($html); $nodes = $doc->getElementsByTagName('title'); //get and display what you need: $title = $nodes->item(0)->nodeValue; $metas = $doc->getElementsByTagName('meta'); for ($i = 0; $i < $metas->length; $i++) { $meta = $metas->item($i); if($meta->getAttribute('name') == 'description') $description = $meta->getAttribute('content'); if($meta->getAttribute('name') == 'keywords') $keywords = $meta->getAttribute('content'); } echo "Title: $title". '<br/><br/>'; echo "Description: $description". '<br/><br/>'; echo "Keywords: $keywords"; ?> <br> This is line 31 in my NotePad++: @$doc->loadHTML($html);
  14. For eg, say I am retreiving 3 records from database and they look like this. <div class="record"> <h1>Record title 1</h1> <p>Record description</p> <button class="button">send message</button> </div> <div class="record"> <h1>Record title 2</h1> <p>Record description</p> <button class="button">send message</button> </div> <div class="record"> <h1>Record title 3</h1> <p>Record description</p> <button class="button">send message</button> </div> and this is my ajax to load the form. <script> $(document).ready(function(){ $(".button").click(function(){ $(".record").load("form.php .new-form"); }); }); </script> the form looks like this. <form class="new-form"> <textarea name="message" class="message"></textarea> <input type="button" name="submit" class="form-submit" value="Send Message"> </form> That all works. The only problem with that is, it loads the form in EACH record. How can I make it so that the form only loads to the div record from which I am calling from?
  15. hey guys so im trying to display data into text boxes that are fetched from database according to checkbox with value id. processing is located before <!DOCTYPE html>: if(isset($_POST['edit_event']) && isset($_POST['check'])) { require "connection.php"; foreach ($_POST['check'] as $edit_id) { $edit_id = intval($GET['event_id']); //i tried (int)$edit_id; $sqls = "SELECT event_name,start_date,start_time,end_date,end_time,event_venue FROM event WHERE event_id IN $edit_id "; $sqlsr = mysqli_query($con, $sqls); $z = mysqli_fetch_array($sqlsr); { } button and form opens: <form method="post" action="event.php"> <input type="submit" name="edit_event" value="Edit Event"> this is the html where the data will be echoed: <div id="doverlay" class="doverlay"></div> <div id="ddialog" class="ddialog"> <table class="cevent"> <thead><tr><th>Update Event</th></tr></thead> <tbody> <tr> <td> <input type="text" name="en_" value="<?php echo $z['event_name']; ?>"> </td> </tr> <tr> <td> <input type="text" name="dates_" value="<?php echo $z['start_date']; ?>"> <input type="text" name="times_" value="<?php echo $z['start_time']; ?>"> </td> </tr> <tr> <td><input type="text" name="datee_" value="<?php echo $z['end_date']; ?>"> <input type="text" name="time_" value="<?php echo $z['end_time']; ?>"> </td> </tr> <tr> <td><input type="text" name="ev_" value="<?php echo $z['event_venue']; ?>"> </td> </tr> <tr> <td><input type="submit" name="update" value="Update Event" id="update"> <input type="submit" id="cancelupdate" name="cancel" value="Cancel" > </td> </tr> </tbody> </table> </div> this is the part which is populated by data from database where isset($_POST['check']) gets the 'check' from: echo "<tr> <td><input type='checkbox' name='check[]' value='$id'>$name </td> </tr>"; </form> thanks in advance!
  16. I'm writing a PHP-based API around some data that is updated as frequently as once a minute, or as infrequently as once every 15 minutes. I'd like to have a cron job push alerts to end users when certain criteria is met (e.g. data goes above a certain threshold), but because my data changes so rapidly and is prone to wild fluctuations, I'm not entirely sure how to approach this. For reference, users can include, for example, people who have downloaded my Pebble smartwatch app, or my upcoming mobile phone app. The data that I'm most interested in (which, if you're interested, is from the ACE spacecraft, and is used to help people view the northern or southern lights) changes every fifteen minutes, and the Kp index it provides is used as a (arguably) good indicator of how likely you are to see an aurora. Values under 5 are usually of no interest to most, anything above 5 (up to 9) are worth getting an alert about. These values can fluctuate, so if a Kp 5 storm is expected, it can hit 6, then dip to 4, then back to 5 and so forth. This is due to the particles ejected from the sun not being a nice, even "wave". I've personally witnessed nights where Kp goes up, then sits low for a while, so you head home, only to find that 10 minutes later it picked up again. Aaanyway, back to my story, I'd like to find a way to alert users about these values when they're of interest, but without bombarding them with notifications, or missing too many events. Here's the various options I've considered: Send an alert every 15 minutes (too often, too annoying, not 'smart') Send an alert every 15 minutes, but only if the value has increased, then "reset" the check after a period of time (better, but what if it hits 7, then dips to 4 for 45 minutes, then hits 6.99? You'd miss out on an alert!) Find a way to check if the user has dismissed the notification and don't re-send it to them for an hour (not feasible, as Pebble's UX doesn't really allow for that, not to mention iOS doesn't have a way to notify your app when an alert has been dismissed) Some kind of data check, where if a value has remained high for longer than 30 minutes, it's alert-worthy and one gets sent out (but you'd miss out on stuff if the value is high for 29 minutes)And riding on the back of that, if the value remains stable, prime the alert. If it increases after it's primed, send the message. I'm more than happy to do some reading and learning. I just didn't exactly know what to search for, as I'm not dealing with something like storage space (where you can send an email if it hits < 20%, and it's unlikely that the storage will fluctuate between 20% and 21%, causing repeated messages) or rare events like CPU usage that you can alert if it stays high for longer than x many minutes
  17. I have 8 rows/columns. They are; Key (which will never repeat), Name, HireDate, Seniority, VacHrs, PTOhrs, username AND password. After a successful login, this is my code; <?php $dbhost = '***7.000webhost.com'; $dbuser = 'a3674631_***'; $dbpass = 'm***'; $conn = mysql_connect("mysql17.000webhost.com", "a36***31_***n9", "****08"); if(! $conn ) { die('Could not connect: ' . mysql_error()); } $sql = 'SELECT Name, HireDate, Seniority, VacHrs, PTOhrs FROM att'; mysql_select_db('a3674631_test'); $retval = mysql_query( $sql, $conn ); if(! $retval ) { die('Could not get data: ' . mysql_error()); } while($row = mysql_fetch_array($retval, MYSQL_NUM)) { echo "Name :{$row[0]} <br> ". "Hire Date : {$row[1]} <br> ". "Seniority : {$row[2]} <br> ". "Vacation Hours Remaining : {$row[3]} <br> ". "PTO Hours Remaining : {$row[4]} <br> ". "--------------------------------<br>"; } mysql_free_result($retval); echo "Fetched data successfully\n"; mysql_close($conn); ?> The problem I’m having is it’s putting everyone’s data, all on one page together for everyone to see. This is private information, and Person A should not be able to see the values for person B. My table has 6 records(currently). If user A has a login of 111791, on a successful login, I would like it to say; Name: First Last HireDate: 04/04/2012 Seniority: 1 (dates that are sorted by earliest to latest) VacHrs: 45 PTOhrs: 18 Key, username & password will never show. Can someone tell me what I’m doing wrong. I know that I’m a noob, so please skip all the “I need read this book….or that tutorial”. I know I do, I’m going to, but in the mean time, I need to get this taken care of. I thank you sincerely for any help.
  18. Hi, I'm looking for help with my sessions and table data So far I have 2 tables, one named: userlogin which contains log in information listed by 'user_id' my next table is called userinfo which at the moment just contains user name and address, again listed by 'user_id' Currently I have a log in page, and a home page. The log in page uses the information from the userlogin table to verify that the user has an account and they have entered the correct information. Now this is were it gets tricky, (for me at least) as on this homepage i'm trying to display the information from the userinfo table which relates to the user_id from the userlogin table, relating to their unique information. The purpose of this is to be able to display information for my clients, all without having hundreds of separate pages and having only one page, which displays the information based upon who has logged in. Here is my loginpage code // Use session variable on this page. This function must put on the top of page. session_start(); $_SESSION['userName'] = 'Root'; ////// Login Section. $Login=$_POST['Login']; if($Login){ // If clicked on Login button. $username=$_POST['username']; $password=$_POST['password']; // Encrypt password with md5() function. // Connect database. //connect $con = mysql_connect("*****","*****","*****"); if (!$con) { die('Could not connect: ' . mysql_error()); } //datebase mysql_select_db("*****, $con); // Check matching of username and password. $result=mysql_query("select * from userlogin where username='$username' and password='$password'"); if(mysql_num_rows($result)!='0'){ // If match. session_register("username"); // Craete session username. header("location:home.php"); // Re-direct to main.php exit; }else{ // If not match. $message="--- Incorrect Username or Password ---"; } } // End Login authorize check. ?> and here is my homepage code. <?php session_start(); if(isset($_SESSION['userName'])) ?> // Connect database. //connect $con = mysql_connect("****","*****","******"); if (!$con) { die('Could not connect: ' . mysql_error()); } //datebase mysql_select_db("*****", $con); //select $user_id = $_GET['user_id']; $result = mysql_query("SELECT userinfo.user_id, userlogin.user_id FROM userinfo INNER JOIN userlogin ON userinfo.user_id=userlogin=user_id"); while($row = mysql_fetch_array($result)) { echo $row['name'] . ' ' ; echo $row['address'] . ' '; } ?> Sorry if this seems confusing, as unfortunately my php skills aren't brilliant, but basically i'm just looking for help creating a log in feature, which then links the user the their profile, with their data present. Thanks in advance!
  19. Hi folks, Is there any specific ORACLE method to show the traffic, data changes and specific user that logged in and made changes ? I need help with this since i need to show the user WHAT, WHEN, and WHO made the changes with the database values. Can I monitor this traffic daily and make some kind of report with PHP ? Any help would be really appreciated Thanks.
  20. sign2apple

    grab some server-side data

    Hello, I want to grab some data using a script from this site. But I am stuck right at the beginning. If you make a selection with the drop down boxes you get some output. For example you select: Selecteer competitienaam: Najaarscompetitie 2014 Selecteer competitiegroep: Eredivisie dames Selecteer weergave: Programma (incl. uitslagen en stand) Optioneel poule filter: De Treffers R Selecteer poule(s): Eredivisie - Poule A I want to grab this output. When I look at the page source it is inside an iframe: <iframe src="http://www.nttb-competitie.nl/" width="100%" height="1200" scrolling="yes" frameborder="0" name="NTTB_Competitie"></iframe> I figured out: The script on the site first it gets url: http://www.nttb-competitie.nl/selectie.php?anr=0 And after last selection it gets url: http://www.nttb-competitie.nl/web_programma.php?reset=0&pidString=1009267&sc=0&vastgesteldeAfdelingsnr=0&cnid=10085&cid=10704&view=programma&pf=1269&pid=1009267 My problem is when I copy those URL's in a webbroser I get a page with only the words: Ongeldige aanroep! Which means "Invalid Call!" So my question is: How can I grab the data instead of this stupid message. Is it even possible or is it somehow protected? Please help!
  21. iRoot121

    Data filter

    Hi, I'm trying to make a program that filters data out of a website. Now I've got a problem. For example, I've this line: <td class="maintxt" width="200"><a href="profile.php?x=Stranger">Stranger</a></td><td class="maintxt" width="200">Godfather (96.76%)</td><td class="maintxt" width="200"><i><a href="clanprofile.php?x=Ettertjes">Ettertjes</a></i></td> Form this line I want to set the word "Stranger" in a variable, and do the same for the word "Godfather". What is the best method to do this? Thanks in advance, iRoot121
  22. I have a table like this. investment_id | investor_id | deposit | Date | Status I will be depositing funds into this table. For eg. If I am paying out 1000 investors at a time, 1000 rows will be added to this table. I might do this 100 times a day. That's 100,000 rows added in a day. Each deposit I do will be unique, even though it might be going to the same person multiple times. This could end up with million of rows. I am wondering if this is the correct way to do this or is there a better method?
×

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.