39,323 Topics
| |
Hello, I have an array that returns city and state in this format: Detroit,MI I want it to be shown as Michigan/Detroit is there any way of doing this? Here is my foreach code: foreach ($i['popularCities'] as $a => $value) { echo '<li>' . $value . '</li>' . PHP_EOL; } … | |
Dear friends, I have an other problem in login form...my code is below.. //********************************connect to database and check**************************************************** $username = "root"; $password = ""; $database = "mydatabase"; $server = "127.0.0.1"; $conn= new mysqli($server,$username,$password,$database); // checkintin connection if($conn->connect_error){ die("connection failed:".$conn->connect_error); } //****************fetch the information from database for match username and password … | |
I am able to delete the file from the database but not the file found on a folder associated with it...is there somethign wrong? <?php include("../includes/mysqliconnect.php"); include("../includes/config.php"); if(isset($_GET['delpost'])){ $delpho = $mysqli->query("SELECT * FROM photos where imageID=$imageID"); $run=mysqli_fetch_array($delpho); $imageName=$run['imageName']; $dir = '/uploads'; unlink($dir.'/'.$imageName); $stmt = $db->prepare('DELETE FROM photos WHERE imageID = … | |
Greetings everyone i have a new problem...again -__- , i make login system with help of some tut , and it works perfect , but what i want to do is when the user login to the success page on the top or anywhere a welcome message will say welcome … | |
Hello, I have page with several sections, in each section form with submit button which will load table and execute mysql queries. I need help to make long tables in more pages, or at least make scroll so user don't have to take long time to go from part to … | |
i have 5 rows and i want to store all row data into database but it is storing only last row data instead of all four | |
Problem:On click logout it again shows the html page content which i dont want to show <?php session_start(); if(isset($_GET['action']) == 'logout'){ session_destroy(); unset($_SESSION['user']); unset($_SESSION['pass']); echo '<pre>'; print_r($_SESSION); //header('location:index.php/'); exit(); } if(isset($_SESSION['user'])== ' '){ header('location:index.php'); exit(); } if( !( isset($_SERVER['PHP_AUTH_USER']) && $_SERVER['PHP_AUTH_USER'] == "a" && $_SERVER['PHP_AUTH_PW'] == "a" ) ){ header('WWW-Authenticate: … | |
i have the following code <?php require_once 'includes/initialize.php'; set_include_path( get_include_path() . PATH_SEPARATOR . CHARTS_PATH); require_once "class/pDraw.class.php"; require_once "class/pImage.class.php"; require_once "class/pData.class.php"; // create data set $myDataset = array(0, 1, 1, 2, 3, 5, 8, 13); $myData = new pData(); $myData->addPoints( $myDataset ); $myData->setAxisName( 0, "Numbers" ); // define image object $myImage … | |
| |
first create the table [CODE] create table images ( image_id serial, filename varchar(255) not null, mime_type varchar(255) not null, file_size int not null, file_data longblob not null, primary key (image_id), index (filename) ); [/CODE] the file to output the images to the browser [B]picsrc.php[/B] [CODE]<?PHP //detect if image is called … | |
Hello friends, Please help me to sort out my problem , actually it is strange one and don't know why it appears. Actually I was trying to make a file upload form which I got success although a bit. A bit in the sense, if I include just <form> in … | |
G'day, I'm currently trying to get a input box with a submit button that puts the command into a string and executes it on a detached screen. Currently I have the following: **index.html** <form id="commandForm" method="post" action="command.php"> <input type="text" name="command" /> <input name="sendCommand" id="sendCommand" type="submit" value="Send" /> </form> **command.php** <?php … | |
Hi everyone, i want Php script for regional Language e-paper like http://epaper.pudhari.com/ that because i want same Hard copy paper on to website in that block wise news reading option (e.g. when u select block news it display pop up or new page just see link above e-paper like that) … | |
Dear Team I am creating a html form for data entry in mysql database and want to multiple rows inserted in one time when i filled a row then on enter key press a new row created automaticaly in html and php for more entering data so how is this … | |
Is it possible to list down all files from a folder then have an option to delete them one by one?if so, can you give me the right way to do it?not the code but the step by step tutorial or explanation..well if its a code I just hope I … | |
I was following a tutorial by codeNmind on Youtube about Facebook SDK V4. I've followed everything, but I keep getting the error that Fatal error: Class 'Facebook\FacebookSignedRequestFromInputHelper' not found in... Anyone with an idea what that could be? And if there is another tutorial you can recommend for posting on … | |
Hey! Long time no speak ^.^ I've been trying to make a query which would follow this logic (Which works in phpMyAdmin): UPDATE member_food SET food_id=12 WHERE member_id=4 AND food_type="breakfast" However, when I do it in PHP: $sql_breakfast1 = "UPDATE member_food SET food_id ='$breakfast1' WHERE member_id='$id' AND food_type='breakfast'"; if ($mysqli->query($sql_breakfast1) … | |
Hello I have 5000 data how can i update one time dbquery("UPDATE ".CATEGORY_TABLE." SET name='".cleanString($data['title'])."'"); | |
Hi Guys I am a rookie here... I have a function which gets information from a postgres database. And returns an array. But how do I echo a single value from the array returned by the function. Please see function below: function getDate($campid) { global $conn,$agencies; $return=array( 'date'=>'', ); $sql … | |
Hello, I had an error while compile this code. Can somebody help me.. I need the answer ASAP..Thank you search.html <form name="form" method="post" action="search0.php"> Search by Matric No.: <input type="text" name="patron_ID" placeholder="Student No."> <input type="submit" name="Submit" value="Search"> </form> search0.php <?php /* include db connection file*/ include("dbconnect.php"); /* capture student number … | |
So, I just installed XAMPP on my PC running Windows 7. Here's what my website looks like: [B]/Header.php[/B][CODE] <?php session_start(); include("http://localhost/Functions.php"); connect(); ?> [/CODE] [B]/Functions.php[/B][CODE] <?php function connect(){ $username = "dartz654"; $password = "letmein"; $hostname = "localhost"; $con = mysql_connect($hostname,$username,$password) or die ("Unable to connect"); mysql_select_db(database, $con); } ?> [/CODE] … | |
a white blank space comes up when i try to access my site, and when i checked the error log on the server, i saw this: "PHP Warning: PHP Startup: Unable to load dynamic library '/usr/php/54/usr/lib64/php/modules/http.so' - /usr/php/54/usr/lib64/php/modules/http.so: undefined symbol: zend_new_interned_string in Unknown on line 0" | |
Hi, I am trying to connect to mysql from php Below is the sample code i used. [COLOR="Green"]<?php <?php $username = "root"; $password = "pwd"; $hostname = "localhost"; $dbh = mysql_connect($hostname, $username, $password) or die("Unable to connect to MySQL"); print "Connected to MySQL<br>"; mysql_close($dbh); ?>[/COLOR] The problem here is I … | |
I have a query by different attributes. When one query is started and we are for example on page 7, and a new attribute is chosen, the query still shows the 7 page of new results. And it should show page 1 as the new attribute is chosen. Could you … | |
Error: Apache shutdown unexpectedly. improper privileges, a crash, or a shutdown by another method. Press the Logs button to view error logs and check the Windows Event Viewer for more clues If you need more help, copy and post this entire log window on the forums | |
So I've given RequireJS a try this weekend, and although it appears to work pretty smooth, I can't figure out one thing: How do I combine PHP and Javascript while using RequireJS? See, RequireJS can only work with .js files, meaning that it cannot "require" .php files. In many files, … | |
Web address of some web sites end with ".aspx", ".php", ".jsp", etc.How web developers can hide the extensions from visibility. | |
I now have a simple "shopping cart" script that I have converted to an "add to shortlist" script to better suit my website. Everything wokrs great however after you click the add to shortlist link it goes to the shortlist page. Here is the code for "add to shortlist" <a … | |
Im trying to bebug some javascript in firefox and I keep getting this error. SyntaxError: syntax error data: {action: addtocart, id: <br /> the javascript is this: <script type="text/javascript"> jQuery(document).ready(function($){ $('#button').on('click', function(e){ $.ajax({ url: 'shopping2/includes/functions.php', type: 'POST', data: {action: addtocart, id: <?php echo $pid; ?> }, cache: false, success: function(data){ … | |
Hi..I sure hope you can help me ! 2 years ago you helped with a Update Form and I've been trying to adapt the form to my mySQL Database.As I'm just learning and trying to figure some of this out I've seemed to have hit a road block. . . … |
The End.