Jump to content

Search the Community

Showing results for tags 'php'.

  • 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

  1. Hi all, I'm looking for some pointers in regards to my form.. How would I firstly trim the $_POST value of the variables that come through via the form (I'm only using one for now)..I know I'm making a right dogs dinner of it. In my head I'm thinking, trim all the posts first before i even assign a variable to it ( i dont know if thats possible), then use an array for when more values start coming through via the form. You know as i make a contact form that requires more data from the user.. <?php require_once '../connection/dbconfig.php'; include_once('../conne
  2. Could anyone help me making a login function that checks the txt document if user and pw exists/are correct? -and if they are, sends you to a logged in page. This is for a assignment which is why I have to store the information in a text document, I know it's unsafe. Also i know i should use $_Sessions but I'm not sure how to use it and where to put it. So far I have created the form which has 2 buttons one for registering and one for logging in. I have also created the registration function which checks the text file if the username already exists if not it will register it. <
  3. I am new in PHP Programming , Please Help me. I have made a data table, then i have connected this table after that I have made a table in my index.php file . but i am facing problem to show data from data table in my index.php file, can you help me to solve this problem? <?php include "db.php"; ?> <!doctype html> <html lang="en"> <head> <!-- Required meta tags --> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <!-- Bootstrap CSS --> <link re
  4. I have a need to create a form that will get info from a mysql table, show that info, two fields one of which I want to be a checkbox that will need to update the table with either a 0 or a 1. I will later use that info. I have searched all over and haven't found what I am looking for. I can find tutorials for creating checkboxes but nothing what I need / want
  5. I have use apache server with PHP installed on it,i created one directory through php coding it get created but it has permission ( drwxr-sr-x 3 www-data www-data 4096 Feb 26 04:54 Merchantid_30) my other directories has ubuntu:ubuntu permission, I want to write on my directory but www-data wont allow me to write on it,giving 777 permission through chmod is risky, can i create directory through php but its default permission is set to be ubuntu:ubuntu instead of www-data ? what changes i need to do in coding?
  6. This brings up my complete novice question: How make a page go somewhere specific other than the top when it refreshes?
  7. I'm working with a relationship table: id (AI), user_id, friend_id, status, type. The current behavior is that the Logged In user can send friendship requests to X user but if there is already a friendship request coming from the X user to the Logged In user; the logged in user instead of sending a new request to X user, he/she should accept the one that is already in the database(which is coming from the X-user). Here is an image of what I'm talking about(in the image, the status column displays 'accepted' but try to imagine it as it was 'pending', please) : So
  8. I am looking for a way to take a "default" file and create copies of the default file and rename with the entries in a list in a text file. I will have about 100 entries in the list. Fishing for ideas. Thanks
  9. I'm currently looping on an array with this structure: Categories{ CategoryName CategoryCode CategoryDescription Products{ product_info{ product_code product_type{ CountNumber ProductDescription } } prices{ "wholesale":"250", "retail":"400" } } } I'm looping on the above array at each level, and I've declared an array so that I can put all my needed values into it
  10. Hi I have a script for displaying images see below <?php include "header.php"; require 'gallery/Gallery.php'; ?> <?php $models=file("models.txt", FILE_USE_INCLUDE_PATH); if(isset($_POST['model'])){ $model=($_POST['model']); } $gallery = new Gallery(); $gallery->setPath('gallery/images/'.$model); $images = $gallery->getImages(array('jpg')); ?> <div class="container"> <?php if($images): ?> <div class=gallery cf > <?php foreach($images as $image):?> <div class="gallery-item"> <a href="<
  11. Hello - I've got this code which is supposed to pull the generated .pdf and display it in the browser. It was working but in the past few months, has not. I'm wondering if there's any obvious code error that might be doing this. Any help/guidance appreciated. I've attached a image so you can see what I mean. The other tabs work (view as HTML on screen, download pdf, email to client) <?php $m_header = '<link href="shared/report.css" rel=stylesheet type="text/css">'; $m_body_tag = ' scroll=no'; require_once($DOCUMENT_ROOT."inc/top-2.inc.php"); $i_get_sid = isset($_GET["si
  12. I have a search function that works perfectly by matching database values and displaying the records on my page. However, I want to make my serial number field in the output a "href " link to open a new page that uses the serial number in the code. I had it working previously with dropdowns but I'm trying to make it work with the search function. Here's the working code: $search = $connect->real_escape_string($_POST['search']); $resultSet = $connect->query("SELECT * FROM staging WHERE serialNumber LIKE '%$search%'"); if($resultSet->num_rows > 0){ while($rows = $resultS
  13. I have an html table with some numerical values in each data row. There are 8 columns representing 8 tests. At the bottom of each column is a corrected accuracy cell which represents a math formula from the three rows above it. Basically, it divides the meter volume by the tester volume, multiplies that result by the tester accuracy, and divides that result by 100. I have attempted something with the following code: <table style="width:100%; border:none; border-collapse:collapse;"> <? php $test1FormA = $row['test1MeterVol'] / $row['test1TesterVol']; $test1FormB =
  14. The server is AWS linux apache running PHP, with me the sole developer as owner ec2-user. Objective: To upload files from the app user's browser (handled) to a temporary directory (/test_sub below) within the /html tree, then for security purposes, to have PHP move this file to outside the /html tree (/private_sub below) where it will remain unable to be read, written to or deleted except when the app requires PHP to do this. The app needs PHP to make any directory permission changes via chmod, and perhaps owner changes and group changes (preferably not the last two). Here is the dire
  15. Hi Guys, I want to implement a search function on a table column. So I used the below code as reference. <?php $connect = mysqli_connect("localhost", "root", "", "test_db"); if(isset($_POST["submit"])) { if(!empty($_POST["search"])) { $query = str_replace(" ", "+", $_POST["search"]); header("location:advance_search.php?search=" . $query); } } ?> <!DOCTYPE html> <html> <head> <title>Webslesson Tutorial | Search multiple words at a time in Mysql php</title>
  16. I have a php program that calls a function in my class to populate a select tag for display in the page. For some reason I cannot seem to discover, it retrieves the information, it correctly creates the option tags, but then when it displays the dropdown dialog box, the very top entry is missing. I sure could use another set of eyes on this to tell me what I'm missing as I know it has to be something simple. Here is the php page code that calls the function: if ($redisp==1) { $table_ex_entries .= "<table><tr>"; for ($x=0; $x<10; $x++) { //get the catego
  17. I have a timeclock application where you can add entries into a table. One of the columns is a <select> dropdown tag. If you do not enter one of the required fields, I redisplay the values entered so the user can correct the entries and resubmit to save them. Everything saves (posts) except the <select> dropdown value. The dropdown does show properly, even with the properly selected value. But if you change the value, it doesn't update. It retains the original value. Here is the function from STOP_Timeclock.php class that does the form: public function add_entries_page
  18. I am having trouble with an array. Don't know to much about them. I have a form on create.php where they can choose multiple items for there trade. On the create.pro.php is where I want it to put all the checked items from create.php together separated by commas into my database. (That way I can explode them later to get them separately - correct?) create.php $stmt = $mysqli->prepare("SELECT id, owner, item_id, uses_left FROM useritems WHERE owner = ? ORDER BY item_id"); $stmt->bind_param('s', $userid); $stmt->execute(); $stmt->store_result(); $countitems = $stmt->num_rows
  19. Hi guys and Gals, This has my head wrecked to be honest. I am trying to upload an image to a directory, which is working. However, I also want to put the file name into MySQL. This will work if the image upload script is removed. With the script enabled, the file uploads but I get "Undefined index: userPic" from the following line: $userPic = mysqli_real_escape_string($mysqli, $_POST['userPic']); Here is the complete code: if(isset($_POST['Submit'])){//if the submit button is clicked $company_name = mysqli_real_escape_string($mysqli, $_POST['company_name']); $company_abn = mysqli
  20. I've been searching for sources to help me understand Linux Apache permissions from the PHP programmer's perspective getting only the rwx and 755 type descriptions and processes in abundance. What I need is a *source* that I can learn Linux permissions from the perspective of the *PHP programmer*, not for the Linux admin who has the box locally or remotely. I'd like to know, for example, when to give each of the three users which permissions for my PHP app's directories, data files and PHP scripts on the basis of heightening security.
  21. Hi I have a problem as title says with form resubmission. I think all know what i mean. When i process form, i redirect to another page, and if i hit back button in browser it give me a page with "Confirm form resubmission", and if i press F5 i got pop-up window and it process form again even if i unset($_POST); data. <?php include '../config.php'; // process form if (isset($_POST['submit'])) { $username = trim($_POST['username']); $password = trim($_POST['password']); $email = trim($_POST['email']); // check if username is in use if ($users->user_exists($username)
  22. Hi I could not load data into input text and select option control. I don't know where i did wrong. Pls advice me Thank you in advence maideen <?php require_once '../inc/header.php'; ?> <?php if($_SERVER["REQUEST_METHOD"] == "GET") { $id=$_GET['id']; $sql ="Select * from tbl_parameter where id ='$id'"; $stmt = $pdo->prepare($sql); $stmt->execute(); while ($row = $stmt->fetch()) { $paramhead =$row['paramhead']; $paramdetails =$row['paramdetails']; $id =$r
  23. I'm so confused with multidimensional arrays. May I please ask a couple questions? 1.) In the json array below, How do I use PHP to echo, for example, the price offered by Susan? I tried things like echo $result["data"][0]["Susan"] to work, but it won't work. 2.) Near the top of the array it shows the lowest price is $25.56. How do I get PHP to echo that? Again, I tried echo $result[LowestPrice] but that doesn't work. 3.) The array below is really big. What code do I use to create a smaller array of just [Name] and [OfferingPrice] ?? If I can do that, then I can do the PHP thing
  24. Hello guys, I have a page named compare.php with two dropdown lists wich are populated with same values from a specific table. Now what i want to do is when a user is selecting one value from the first dropdown and another value from the secound dropdown to be redirected to a page lets say compare-items.php?id=1&id=2 and here in two different cols to get the values for the items, in the first col the values for the first item, and in the secound col the values from the sec item. How can i achive that? Thank you very much!
  25. Hi everyone, I am trying to create two column in php with for loop. seem it is not really work very good because it is repeating. I need to create one value in each value, not repeat. what I need is in output: | value1 | value2 | | value3 | value4 | but I made an ouput: | value1 | value2 | | value1 | value2 | Please forgive me for my english error because it is not my prime language, I am using sign language - American Sign Language. Here my code: <?php require('require.php'); $list = "select FirstName, LastName from Members"; $display = mysqli_query
×
×
  • 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.