39,323 Topics
| |
Hi I've been working on a joomla site on my local windoes vista computer using WAMPSERVER vrs2 and with apache. Something went wrong with apache and windows warned me and turned it off. Since then I can't use [url]http://localhost[/url] (or the shortcut on the wampserver menu 'localhost' to connect. However … | |
Hi All PHP , Below is funtion which store product in session. $resource is database link and product just getting product from database for a given $_GET['product_id'].when i am clicking on a single product and adding that in cart it is working. if i add another product so session array … | |
Good Evening, I'm trying to modify a function that I wrote a few months ago to work on a 2 dimensional array instead of the single dimension I have been using. My question is, before I start rewriting it only to find out that I can't do it... Can you … | |
Hi, I would like to loop the data-attribute to contain all column names and values from a mysql table. This is what it looks like today: while ($row = $result->fetch()) { echo "<div id='{$row['namn']}' data-column1='{$row['column1']}' data-column2='{$row['column2']}'... So some kind of magic :) loop inside there so I don't have to … | |
Out of curiousity, if any of you have ever done image watermarking with PHP, I'd love to hear some ideas. PHP's official documentation on watermarking with alpha channels isn't bad but I'm curious about the existence of other libraries that some of you might have used. | |
i am working on a small gallery website(project) and i want to give users provision to upload multiple photos and it should appear on the same page...Thanks in advance. | |
So, when I run this code on xampp, it works and I can see the variables, without the header. <html> <head> </head> <body> <?php $user=""; $server=""; $db=""; $pass=""; $con=mysqli_connect($server,$user,$pass,$db); $id=$_POST['loginid']; $password=md5($_POST['password']); $result=mysqli_query($con,"SELECT * FROM passwords WHERE userid='$id' AND password='$password'"); session_start(); if($row=mysqli_fetch_array($result)){ require('../connect/registerdb.php'); $rresult=mysqli_query($rcon,"SELECT * FROM registration WHERE userid='$id'"); while($rrow=mysqli_fetch_array($rresult)){ $_SESSION['name']=$rrow['name']; … | |
How can I send some data to a MySQL database? I'm using php. | |
I am still trying to get a grasp on the php/mysql interaction. Why does something like this not work and without all the error catching, can one do something like this? [CODE] $result = mysql_query("SELECT * FROM stadium WHERE gametime = `$_z`;"); $row = mysql_fetch_row($result); $bababa[name] = $row[0]; $bababa[town] = … | |
<td>Upload your pic</td> <td><input type="file" name="1234" value=""></td> <?php $img =$_POST['1234']; $sql="UPDATE users SET FirstName='$FirstName' , LastName='$LastName', UserName='$UserName' $sql_pass,Email='$Email' , Gender='$Gender',PicUrl='$img' WHERE UserId='$User_ID'"; ?> want to save in image folder also | |
here is my code. it only retrieve last inputted data. How can i populate all data in a htnl table. <html> <?php $id =new Register(); $test=Register::selecthey(); foreach($test as $t=>$sid){ } ?> <table> <thead> <tr> <th>Document ID</th> <th>Personnel ID</th> <th>Docs Name</th> <th>Docs Num</th> <th>Docs Date</th> <th>FileName</th> <th>Data</th> </tr> </thead> <tbody> <tr> … | |
Good days guys, in my main.php page I select data from mysql db and then if selected on any rows send data to ajax script, so everything is ok but when I click in any rows I receive one data. <table cellpadding="0" cellspacing="0" border="0" class="display mobile_dt1 dt2"> <thead> <tr> <th … | |
<?php include"header.php"; if(empty($_SESSION['UserName'])){ header("Location: http://localhost:1234/city"); exit;} $result = mysql_query("SELECT * FROM menu"); echo "<td><a href='http://localhost:1234/city/menu_update_insert.php'> <img src='images/create.png'>Add New Record</a> </td>"; echo "<table border='0'> <tr class='tableheader'> <th>PageName</th> <th>MenuName</th> <th>ParentMenuId</th> <th>LinkWidth</th> <th>OtherUrl</th> <th>Status</th> <th>CreatedDate</th> <th>OnMainMenu</th> <th>FooterMenu</th> </tr>"; while($row = mysql_fetch_array($result)) { echo "<tr class='tablerow'>"; $rpId=$row['PageID']; $result1=mysql_query("SELECT * FROM page WHERE ID=$rpId "); … | |
Hello, Does anyone has experienced storing chinesse character in php xampp. I have an elearning project for mandarine course and I unable to store chinesse character in php xampp. I have found an opensource test maker and looks like I have modify it a little bit so that it could … | |
If I try to run the following PHP code, I get a "Call to a member function query() on a non-object". Do you know why? I use the same code on another site (http://daveismyname.com/creating-a-blog-from-scratch-with-php-bp#.U6fdxPmSxmx), where it works just fine. config.php <?php ob_start(); session_start(); //database credentials $username = "demo"; $password = … | |
hello i m a student & new to php i want to pass id from one page to another page using get & post method but the id can not be passed it shoes the variable in URL instead of value please can any one help me Here is the … | |
I want to count rows from table1 and rows from table2 and retrieve a sum from both tables. i use this... $query=mysql_query("SELECT COUNT(*) AS total FROM (SELECT COUNT(*) FROM message_believe WHERE message_believe.uid_fk ='$uid' UNION ALL SELECT COUNT(*) FROM review_believes WHERE review_believes.uid_fk ='$uid' )"); $data=mysql_fetch_array($query); echo $data['total']; what do i do … | |
I keep getting Fatal error: Call to undefined function newMyOperatorClass() in C:\wamp\www\KanJ_PHP_Website\KanJ_PHP_Ex2.php on line 17.....here is my code... <html> <head> <title>Justin Kangley Ex2</title> </head> <body> <?php class MyOperatorClass { private $rValue; //declare private property at the class level so all the functions use it //default constructor method (same name as … | |
I want to make two short by options for the users to be able to check out the most recent uploads and the ones with the most views. The query works fine but i dont know how to make the link (<a href="") work. I made this change on the … | |
i have created many services, (i.e products in suitecrm) . there are some main services under which some sub services are there. i am mapping all the main services to one product (i.e product category in suitecrm). now on select of one particular product i need to dispaly all the … | |
Hi Guys, Okay so i know how to upload a img to database as blob that is no problem. I have a form that i use to upload products to my db i want to add a product picture to each product now but i don't know how to retrieve … | |
hi i have a problem while installing joomla lacally. i tried following procedure http://magazine.joomla.org/issues/issue-mar-2013/item/1110-free-e-book-%E2%80%93-introducing-joomla-30-made-easy after fill all the fields click install button its tooks more time but still not installed. am getting problem in create databae tables is stil loading. | |
I want to import/upload excel files to sql server via cake php, it will occur Undefined variable: ext and Undefined index: the code are shown as below. Is there any mistake in my code? Thanks in advance! <?php App::import('Vendor', 'php-excel-reader/excel_reader2'); class UploadsController extends RealTimeAnalysisAppController { public function upload() { $destination … | |
Need some tutorial to adding meta tags in php website with image or video link.. help | |
I need help trying to get my mysqli_query() function to work right. I have this so far: $raw_results = mysqli_query($con, "SELECT * FROM numdata WHERE numb='%".$k."%' UNION SELECT * FROM numdata2 WHERE numb='%".$k."%' UNION SELECT * FROM numdata3 WHERE numb='%".$k."%' UNION SELECT * FROM numdata4 WHERE numb='%".$k."%' UNION SELECT * … | |
I'm doing this $query = mysql_query("SELECT M.msg_id, M.uploads, M.message, M.description, M.type, M.text, M.views_count, U.username, C.name as country_name FROM users AS U INNER JOIN messages AS M ON U.uid = M.uid_fk INNER JOIN head_networks AS H ON M.network_id=H.network_id LEFT JOIN countries AS C ON M.country_id=C.country_id WHERE M.type='A' "); $Order = " … | |
I need to create a system that requires the process to add, edit, delete, and view. I have some problems with editStaff.php, I can edit the data, but it does not display the data in the database when doing the process. Do you know why? index.php <?php include("authenticationStaff.php"); include ("dbase.php"); … | |
<?php $picurl=$row['PicUrl']; >? <td><input type="file" name="userfile" ></td> | |
Hi, How can i change My Wishlist in to My Shopped List in magento.? | |
<td>Upload your pic</td> <td><?php if(!empty($picurl)){echo '<img src="'.$picurl.'" align="left"width="50px" height="50px"/>';}?> <input type="file" name="userfile" ></td> </tr> <tr class="tableheader"> <td colspan="4" class="last"><input name="submit" type="submit" class="button" value="Update"/></td> </tr> </table> </form> <?php if (isset($_POST["submit"])){ if($_FILES['userfile']['type']=="image/jpg" or $_FILES['userfile']['type']=="image/jpeg" or $_FILES['userfile']['type']=="image/gif" or $_FILES['userfile']['type']=="image/png"){ echo "Error number: ".$_FILES['userfile']['error']."<br/>"; //$_Files is a global array,its 2 dimen if(file_exists("image/".$_FILES['userfile']['name'])){ echo "file … |
The End.