39,323 Topics
| |
I am using flat file db, not mysql so I can't use $limit I need to limit the number of records to 1, if more than 1 then echos something else: [CODE] $result = $db->getall(month); foreach($result as $item) show_record($item); } [/CODE] I tried to use 'break' but it comes back … | |
I am using a FFDB database (Flat File Database). This script works but it only shows first record (#1), if I delete the 1st record I get a blank page. I want to call all records and find 1 (one) that matches the criteria(s) independent of its record (key) number. … | |
I'm trying to send an html/plain text email for an invoice program I am writing. I really want the html message because it offers better layout options for invoicing and some features to help my customers with their payments. However, some email clients don't work with html email -- especially … | |
Hello all, I've a seemingly simple question, but it's kind of got me thinkin there might be a "proper" way to accomplish my goal. My goal is a simple MySQL database schema install. In PHPMyAdmin I export a database, any database. I then save the file to the root directory … | |
This code will not insert OR update. But on the other ones it will.. but for this one, I'm doing an extra step to say that they can claim the item or not. From adding that extra step, it won't insert or update. [code]$rand = rand(1,3); if ($rand == 1) … | |
Hello, I'm new to php and I'm trying to code my first contact form. The only problem I have is that I receive no email when I test it on my server. I have an index.php file and a handle_form.php file. Here is my code... Am I doing something wrong? … | |
Hi All, I have checked some available functions for error handling in php. But i didn't reach to goal. I want any php error to be shown on custom page. e.g. if there is comma missing and system throw [B]Parse error: syntax error, unexpected T_VARIABLE[/B] on the browser, can i … | |
Hi everyone, My second time back to Daniweb looking for assistance with PHP. :) Okay, here's my PHP, and I'll explain what it does. [CODE]dbConnect(); if ($userclient == '2438') { dbOpenDatabase($GLOBALS['res_2438_contacts']); } else { dbOpenDatabase($GLOBALS['db_contacts']); } /************************************************ * THE IMPORTANT BITS - CHANGE BELOW * ************************************************/ //Product ID for Safety … | |
I need a fresh start and some fresh ideas. I get some text from a MySQL database and present like below. Each row is divided into five columns with radio buttons. ---------------------------------- Text 1-Text 2-Text 3-Text 4-Text 5 Radio1-Radio2-Radio3-Radio4-Radio5 ---------------------------------- Text 1-Text 2-Text 3-Text 4-Text 5 Radio1-Radio2-Radio3-Radio4-Radio5 ---------------------------------- and so … | |
Hi all, I would like to ask if anyone could help me about AJAX validation error message with CAPTCHA (secureimage) - At the moment the error message display at processForm.php, IF user entered a wrong code. But what I would like do to is; the error message will POP UP … | |
Hello, I am stumped on a problem im having, and I get the feeling that the solution is quite simple yet requires knowledge of certain functions. Basically I am creating a guestbook which allows users to post comments, however I am trying to create an admin approval system so that … | |
Good God, I've been stuck for like 2 hours, I suppose I can't think clearly anymore, but I just don't see why the statement below won't work, please help me out : [CODE]<?php session_start(); $username = $_GET['username']; $db = new PDO('mysql:host=localhost;dbname=subscribers', 'root', ''); $sql = "INSERTO INTO users (username) VALUES … | |
Hi all, I am facing a problem here which would like to seek helps from the experts. I have a table which is able to display all the data in text field format from the database in a table. The users are able to edit the displayed data. I would … | |
I am looking for a button that inside a php table. I tried [CODE]echo "<td bgcolor='#FFFFFF'><center>" . '<input type="button" name="Activate" value="Activate" class="form" onClick="activate_user_id('.$rows['username'].','.$rows['loginid'].','.$rows['activated'].')">' . "</center></td>"; [/CODE] I know people said i have to use AJAX to make it work. but i dont know AJAX at all, Can anyone show me … | |
I am using session variables, it is working on local but I run on server, it is not running. I am using Jquery | |
function edit_user($username){ if ( $username == 'admin' ) { $query = "SELECT * FROM login WHERE username != 'admin'"; $queryResult = mysql_query($query) or die (mysql_error()); echo "<table border='1'> <tr> <th>Loginid</th> <th>username</th> <th>email</th> <th>activated</th> <th>Edit User</th> <th>Delete user</th> </tr>"; while($rows = mysql_fetch_array($queryResult)) { //Todo: Here is a problem //probably use mysql_num_array … | |
I have what appears to be a javascript or other type of code in htpdocs of a newer Joomla site, there is a index.htm that I think is causing a 2-3 second delay for the homepages to load up? and I would like to remove this... goto myurl for the … | |
I have a new project. The site will require registered users to pay an amount to upload content to the site. Also, I would like a thumbnail scroll gallery on the homepage that will pull up random profiles (a featured profile feature). If anyone can point me in the right … | |
This is my blogic.php file. The problem is i have created a patient login form and a database name"gmd" so as soon as i fill in d username n password in patient login form it should retrieve the whole information from "gmd" database bt it is showing an error in … | |
I don't know what's wrong with this code. I think this code should work. I'm about to store number of each query in array [CODE] $antecedent=array(); for($i=0;$i<=$index;$i++){ if(isset($period[$i])|| isset($gpa[$i]) || isset($antecedent[$i])){ echo $period[$i]." "; echo $gpa[$i]."<br/>"; $queryAntecedent=mysql_query("SELECT * FROM mytable WHERE study_period='$period[$i]' AND ipk='$gpa[$i]'") or die (mysql_error()); $antecedent[$i]=mysql_num_rows($queryAntecedent); }//endif }//endfor print_r … | |
Hi Guys! I am trying to custom signature images, a generated one as such on a form submit. At the moment I am still doing the images although I wish to add an image into the signature and I am not too sure how I will do that. I have … | |
Hi, i need help , i wanted images to be for instance 4 in row, before it goes on to the next row, and below the images i wanted a title there. This are my work so far, but i just cant get to what I wanted, i've been searching … | |
Hi, I need to use PHP inside html print ' <html> -----part <select name="speriod"> [B] <option value='<?php $cval ?> print '>'<?php echo $cval ?> print '</option>[/B] </select> </html>' I don't know to add PHP inside html tag. Facing Parser Error | |
Installed Wordpress Multisite on Windows server 2008R2 and seems to be working fine EXCEPT: the update feature in WP fails or anytime when it tries to install something for you. I set up a valid / working FTP account as it sometimes asks for this, but that does not work … | |
I am using Jquery Popup-Form to send coupon code (which came from database) on email and through SMS. I am using to store couponcode in a session; but the page called by Jquery is not showing the value of session, I wrote session_start() at the top on both pages, still … | |
| Hi everyone, I have setup a cron job to delete users from my site if they are not verified within 24 hours of registration. The field [b]registration_timestamp[/b] is stored as a timestamp and I also have a field called [b]verified[/b] which is stored as a 1 or a 0. Here … |
it doesn't have any error but also i does not update in my database? [CODE]<head> </head> <?php include('connect.php');?> <body> <?php mysql_select_db("dbusers",$connection); $result=mysql_query("UPDATE tblinfo SET idno='$idno', name='$name', address='$address', birthdate='$birthdate', contact='$contact', email='$email' WHERE 'index'='$id'"); $result = mysql_query($update) ?> </body> </html> [/CODE] | |
how to convert Month in words to its numeric equivalent.... example: <?php $month = 'JANUARY'; // code to convert the month JANUARY to its numerical equivalent... echo 'help please for the numerical JANUARY equivalent here'; ?> ----------------------------- SAMPLE OUTPUT 01 | |
[CODE]<script type="text/javascript"> function populateHarga() { var x=document.getElementById("barang").value; document.getElementById("harga").value=x; var y=document.getElementById('barang')[document.getElementById('barang').selectedIndex].innerHTML; document.getElementById('nama_brg').value=y; } function populateTotal() { var y=document.getElementById("jumlah").value; var x=document.getElementById("harga").value; document.getElementById("totalnya").value=x*y; } </script> <body> <p> <?php mysql_connect("localhost","root",""); mysql_select_db("stageco"); ?> <table border="1" cellpadding="0" cellspacing="0"> <?php $nama_b=$_GET['nama_brg']; $harga_b=$_GET['harga']; $jumlah_b=$_GET['jumlah']; $total_b=$_GET['totalnya']; if($nama_b!="") { mysql_query("INSERT INTO temp('t_nama','t_harga','t_jumlah','t_total') VALUES('$nama_b','$harga_b','$jumlah_b','$total_b')"); } $result=mysql_query("SELECT * FROM temp"); $i = … |
The End.