39,323 Topics
| |
Hi Guys, I want to be generating random quote of the day. I want it to be so random and not repeating itself the same quote What is the trick (If code exclude simple db stuffs like mysql_connect et al) Thanks | |
Hi everyone, I am new to PHP. I have a problem. I have a simple HTML form where when I select the country from select / option list provided, i want PHP to echo message on country I selected. Also I want PHP include function to list the form specific … | |
Does anyone know how to move around the tables using PHP. | |
I am converting a PHP application from MySQL to PostgresSQL. The MySQL works flawlessly. The database for this application is a one to many relationship. I have a while loop nested inside another while loop <?php while ($movie_row = pg_fetch_array($movie, PGSQL_ASSOC)) { ?> [html code to echo various elements of … | |
HI I'm trying to learn how I need to upload a file and I am wondering if I have to use <form method=post> </form> or can I use <form method=get> </form> and why. Thanks in advance | |
i want to know how to create database when there are check boxes. i also want to know the codes to connect those checkbox values to database and retrieve from database. this is my part of my html code. <tr> <td>Professional Qualification <br /></td> <td style="height: 78px"> <input type="checkbox" name="Charted" … | |
Hi I'm creating a website that uses a count query, to see how many things in the database match a variable. Table eg: Whats Liked User Liked By potatoes djiajgi computer djiajgi ......... Now, I'm trying to see people who like the same thing as you do, and am ordering … | |
` if(something here) { <img src="a.jpg" class="image" /> } else if(somthing here) { <img src="b.jpg" class="image" /> } I have something like it But class and events associated with it in jquery does not work for second block. Please help. | |
I got a product table like this id | name | category 1 | name1 | 2,1,5,8,9 2 | name2 | 2,1 3 | name3 | 5,8 And I got a category table like this id | catname 1 | cat_name1 2 | cat_name2 5 | cat_name3 8 | cat_name3 … | |
<select name='brgylist' id='list'> <?php require_once "connection.php"; $result = mysql_query("SELECT `BrgyCode`,`Barangay` FROM `ref Barangay`"); while($rec = mysql_fetch_array($result)) { echo '<option value="'.$rec['BrgyCode'].'">'.$rec['Barangay'].'</option>'; } echo 'The Code selected is '.$rec['BrgyCode']; ?> </select> I want to store the selected dropdown list to a variable because i will use it to query to output in … | |
In which **real** situations have you seen C++ usage for web applications wth PHP? I've looked throught the forum, I've asked uncle Google and I know that: - PHP extensions can be written in C/C++ - there is a great amount of C/C++ libraries you can use in PHP projects … | |
Hi, I'm creating a website where users can liket things and by liking things you'll see people who have liked the same thing on your home page. Now, currently my code shows people who like ONE same thing as you, but how would I make it so that if anyone … | |
This may sound like a question I shouldn't need to ask, but here I am asking it... In a PHP page I am doing some simple html stuff, where there is a reference in a paragraph to information on another part of the page (rather lengthy document)... in html I … | |
Good Morning All, and HAPPY NEW YEAR to everyone, whether you celebrate it or not... I have what should be a relatively simple question that I would like to pose that could avoid a very lengthy one... if I create an associative array and place several key>value pairs in the … | |
Ok,I havent a clue how to do this. I have a mysql table for products, each has id as the primary key. I have an admin page where I upload products to this table or delet/hide them too. But I want a way where when I'm uploading the products to … | |
I would love to know whether this code is the correct manner to send mysql data to a remote database. $host = 'www.domain.tld'; $user = 'remote_user'; $pass = 'remote_password'; $time_end = microtime(true); //grant per;misions to connect to remote host if (!function_exists("ssh2_connect")) die("function ssh2_connect doesn't exist"); // log in at server1.example.com … | |
Guys help i want to retrieve data using hyperlink. for example when you click location information about that location will be retreived. iam using search fuction its working properly. help me out thanks | |
echo "<tr><th><a href='#' onclick=/"sort(' . $order .')/"></a></th></tr>"; | |
$_GET is empty and this is my code. I dont know what to do <?php session_start(); ?> <?php error_reporting(E_ALL); ini_set('display_errors', '1'); $hostname = "localhost"; $username = "xxxxx"; $password = "xxxxx"; $database = "db1104107"; //echo '24'; //connection to the database try { $dbhandle = new PDO("mysql:host={$hostname};database={$database}", $username, $password); } //to handle … | |
A simple question (One which I do not have the answer to yet). One small yet important aspect of my current project is collecting IP addresses via email registration/email confirmation. I assume seeing an IP is not difficult (User's email header?) **My question is**: *Is this IP the IP of … | |
Hi, I'm trying to make a website in which users can post thing. The thing is, is that if it is a photo then I want it to show as a photo. Unfortunately, if the first row in the database that matches my query, all the posts will be echod … | |
AGH that was annoying...After typing this whole thing I went to register with Google+ and now I have to type it all again...anyways... I have a registration page on a CMS that I'm building. The first step in attempting to register is to enter an email address. Once it's entered, … | |
hiee i want to sort a column on the click of hyperlink of header i m doing it by sql query so how so i write javascript for this so that i can call on onclick of hyperlink and column get sorted | |
Hey guys, I just bought a Macbook Pro but I can find a software that works like WAMP for the Mac OSx for managing MySQL & running PHP scripts on local host, can you guys help? | |
I have a website that gives search results of products. I am using page numbering for splitting up search results from 1 to 10. I need to do some work on this search page. First of all, I want to fix the page numbering system. Currently it is showing a … | |
<td><input type="text" name="c1" value=" <?php if($p_id!="")echo $a? else echo $p_name>" ></td> | |
Hi, I have here a code for saving a pdf file to mysql database as blob. may problem is how can i retrieve pdf blob in php. thank you. <?php if(isset($_POST['add']) && $_FILES['filename']['size'] > 0) { $fileName = $_FILES['filename']['name']; $tmpName = $_FILES['filename']['tmp_name']; $fileSize=$_FILES['filename']['size']; $fileType = $_FILES['filename']['type']; $fileType=(get_magic_quotes_gpc()==0 ? mysql_real_escape_string( $_FILES['filename']['type']) … | |
Hi, Below is the code I am having difficulty making work: public function showLoginOut() { if (session==null) { return '<li><a href="login.php">Login</a></li>'; } else { return '<li><a href"logout.php">Logout</a></li>'; } } *^ Above is a PHP page, which holds functions I can use in a phtml document* <ul> <li><a href="index.php">Home</a></li> <?php function … | |
Good day I need help incorporating a progress bar into my code, I first needed to export a query from my database but however the time taken for the query to be exported to a xls file should be shown in a form of a progress bar. if i exit … |
The End.