39,402 Topics

Member Avatar for
Member Avatar for Ann Krizette

we are about to begin our thesis report, we need to create an inventory system using php codes, i chose inventory system of stocks in a pharmacy, can you help me do the system?where should I begin..Thank you :)...really need your help experts :(

Member Avatar for pritaeas
0
112
Member Avatar for cakka

Hello, I am learning PHP. Now, I am creating login page. This is my index.php codes <?php require "../config.php"; session_start(); $username = $_SESSION['username']; $password = $_SESSION['password']; if(!$username && !$password){ header('Location: login.php'); } else { echo $hello.$username; } ?> And this is my login.php <?php require "../config.php"; session_start(); function loginForm(){ echo …

Member Avatar for Ejim Kingsley
0
269
Member Avatar for colo_cool

i have a text file as abc.txt which looks like hi hello john how are you jelly fine thank u now i need a php code to select this file from html page and read this text file line by line and store each line as a seperate row in …

Member Avatar for diafol
0
1K
Member Avatar for davy_yg

Hello, I am following this tutorial: http://www.codefactorycr.com/login-with-codeigniter-php.html It works when I copy it exactly as it is. Now, I only wonder why eventhough I try to imitate it and modify it a little bit to match my system, I wonder why it still does not work ? views/admin/login_view.php <!DOCTYPE html …

Member Avatar for cereal
0
517
Member Avatar for foxwizzy

so i have 2 lists i need to compare $list = array("Apple", "Orange", "Lemon", "Candy"); and $db = $r_bio['other']; $db2 = explode(":", $db); i want to compare the two and if i find the same i want to echo a checked checkbox if not an unchecked checkbox if($db2 == $list) …

Member Avatar for foxwizzy
0
117
Member Avatar for isaac.iji.5

hello guys am creating site were all users can post for there friends to see ans coment just like facebook where am having problem is how to make sure only a users friends can see there post not the whole site members i have table in my database called post …

Member Avatar for isaac.iji.5
0
273
Member Avatar for andika.kurniawan.121

for($i=1; $i<=($jumlah_row_tabel_atas+1); $i++) { $satuan = $_POST['PP_row_'.$i.'_satuan']; $word_2[$i]="SELECT id_unit FROM manage_unit WHERE name_unit = '$satuan'"; $q[$i] = mysql_query($word_2[$i]); $data_X = mysql_fetch_array($q[$i]); $id_unit = $data_X['id_unit']; $harga_1 = $_POST['PP_row_'.$i.'_harga_1']; $harga_2 = $_POST['PP_row_'.$i.'_harga_2']; $harga_3 = $_POST['PP_row_'.$i.'_harga_3']; $id_drug = $_POST['id_drug']; $value = $value_array[$i]; $word="INSERT INTO relation_mu_and_unit (id_drug, id_unit, priority, value, harga1, harga2, harga3, last_edit) …

Member Avatar for urtrivedi
0
161
Member Avatar for tony75

Hi I need better way to my checkboxes in form.php here is code <h3>Which programming languages should you learn first?</h3> HTML <input type="checkbox" name="cb_html" value="HTML"><br> PHP <input type="checkbox" name="cb_php" value="PHP"><br> Perl <input type="checkbox" name="cb_perl" value="Perl"><br> Python <input type="checkbox" name="cb_python" value="Python"><br> And my form.php code is #checkboxes if (isset($_POST["cb_html"])) { echo …

Member Avatar for tony75
0
1K
Member Avatar for ronh100

I want to have an image map with hot spots that will run a php script when clicked. I'm new to this so any help will be appreciated.

Member Avatar for JorgeM
0
48
Member Avatar for Estevan_Musgo

Hi guys, Im a uni student who's just getting started on PHP + i've hit a brick wall already. One of my tasks is to use PHP to show the song lyrics of "10 green bottles" (standing on a wall) using loops and if statements. I was thinking of having …

Member Avatar for Estevan_Musgo
0
103
Member Avatar for casey.li.146

What the webpage would do is after clicking "SUBMIT" button, a php script will be use to add records into my database. But for now i do not know where to put the "signupinsert.php" into the html and to make it run. I have try putting it at form action …

Member Avatar for JorgeM
0
4K
Member Avatar for tony75

Hi How can I pass value of my radio buttons to my form.php code? I will be very thankfull for your answer. <form action="form1.php" method="post"> First name: <input type="text" name="fname"><br><br> Last name: <input type="text" name="lname"><br><br> <h3>What is the best programming language to learn for hacking</h3> Python <input type="radio" name="rb_python" value="Python"><br> …

Member Avatar for tony75
0
343
Member Avatar for kelley82879

I have a searchable database.. I would like to change the style of how the table is displayed... I have a css file of how I would like the table displayed.. Can that be done? If so..How?

Member Avatar for kelley82879
0
301
Member Avatar for rrajeswari03

i need to upload multiple image randomly in flex with php as backend..can any one help me??

0
124
Member Avatar for Indians

<?php include("config.php"); if (isset($_POST['submit_val'])) { $cmeal = mysql_real_escape_string($_POST['meal']); $meal = "INSERT INTO ebmealplans( MealPlanName, CreatedOn ) VALUES ( '{$cmeal}', NOW() )"; if(!mysql_query($meal, $link)) { die("Error : " .mysql_error()); } $croom = mysql_real_escape_string($_POST['room']); $ref_key = mysql_insert_id(); $room = "INSERT INTO ebroomtypes( RoomTypeName, CreatedOn ) VALUES ( '{$croom}', NOW() )"; if(!mysql_query($room, $link)) …

Member Avatar for diafol
0
8K
Member Avatar for Zain_2

Hi, I need to automatically submit button only once. the javascripts i have tried keep submitting the page in an endless loop so to fix the problem the auto submit part only needs to work once when the page is loaded. please help. Thanks

Member Avatar for JorgeM
0
121
Member Avatar for nadiam

So i have a table and a calculate button. the calculate button is responsible to selecting data from specific tables and then the selected data will be displayed and added together along with the calculation. but something is wrong with the process because it is not calculating correctly. table & …

Member Avatar for Lsmjudoka
0
354
Member Avatar for Indians

index.php coding <td><input type="text" name="slno[]" value="" size="2"></td> <td><input type="text" size="10" name="date[]" id="SelectedDate" onClick="GetDate(this);" readonly="readonly"/></td> <td><input size="24" type="text" name="particulars[]" value="" placeholder="Description"></td> <td><select name="noofnights[]" value="0"> <option value="empty"></option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> <option value="11">11</option> <option value="12">12</option> <option …

Member Avatar for Lsmjudoka
0
6K
Member Avatar for yavindu

Is there good way to generate reports in php(Free software which can customize tables easy).I've used dompdf, but when table is big every thing gets mess up. Thanks

Member Avatar for Lsmjudoka
0
130
Member Avatar for nadiam

My form has a 'save' button and 'select from previous month' button. what 'save' button does is insert all the values into my database. save button code: if(isset($_POST['jansave'])) { $basic = $_POST['basic']; $allowance = $_POST['allowance']; if($basic&&$allowance) { require "connect.php"; $total=($basic + $allowance); $query=("INSERT INTO january (basic,allowance) VALUES ('$basic','$allowance')"); $janresult=mysql_query($query); } …

Member Avatar for Lsmjudoka
0
5K
Member Avatar for nancybrown1959

Can anyone help me figure out how to fix these errors? Warning: mysql select db(): supplied argument is not a valid MySQL-Link resource in /home/xxxxx /index.php on line 37 Line 37 is: mysql_select_db($conn, "yourmil_content"); ----------------------------------------------------------------------------- Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in/home/xxxxxx/index.php on line 247 Line …

Member Avatar for Lsmjudoka
0
435
Member Avatar for nadiam

hey guys, so im trying to display data from my database into a table but i got this error : Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\CashFlow\balance_report.php on line 45 code: <?php require "connect.php"; if($_SESSION['name']) { $name = $_SESSION['name']; $query=("SELECT * FROM asset WHERE name …

Member Avatar for nadiam
0
217
Member Avatar for suraj32

Hi, I've got this string when parsed a web page. string(41) "_result_ = {status:"OK", id:"30025", name:"John Doe", location:"India"}" I believe that this code is JSON. but when I use json_decode() , it returns NULL. Someone Please help me parse this string. Thank you. :)

Member Avatar for suraj32
0
189
Member Avatar for Karry.Stewart

Hi I've a website and it shows a strange urls on the search engine and it sometimes crawls or wont show in the search engines what to do should we keep a robots.txt file. and How to take away the strange url we see in all search engines as **www.website.com/?C=S;O=A** …

Member Avatar for cereal
0
304
Member Avatar for DTSCode

so i want to set default error pages for my website, but im having trouble with setting the default 404 page (i havent done any others yet). i am running a lamp server, and put the .htaccess in the root of it (/var/www) and put in it ErrorDocument 404 /error/error404.php …

Member Avatar for TheJeffMatson
0
275
Member Avatar for tqmd1

Dear Sir, I have following codes <?php $country=""; $capital=""; if (isset($_POST['submit'])){ $country=$_POST['text1']; $capital=$_POST['text2']; if (empty($country) || empty($capital)){ die ("<script> alert('Please fill both boxes')</script>"); }else{ echo "<script> alert('The capital of $country is $capital')</script>"; } if (isset($_POST['clear'])){ $country=""; $capital=""; } } ?> <html> <head> <title>Result on same page</title> </head> <body> <center> <form …

Member Avatar for furqan219
0
121
Member Avatar for pranay.baba

<?php include("db.php"); $result1 = mysql_query("SELECT DATE_FORMAT(CURDATE(), '%Y-%c-%d %H:%i') "); $row=mysql_fetch_array($result1); $from=$row['0']; echo $from; echo "<br>"; $result2 = mysql_query("SELECT DATE_FORMAT(CURDATE() - INTERVAL 2 DAY , '%Y-%c-%d %H:%i')"); $row1=mysql_fetch_array($result2); $to=$row1['0']; echo $row1['0']; $result3 = mysql_query("SELECT * from pr where date between '$to' and '$from' "); $row3=mysql_fetch_array($result3); //$to=$row3['0']; echo $row3['0']; echo $row3['1']; ?>

Member Avatar for diafol
0
163
Member Avatar for annyangel

i have a database (hello) and it has 2 tables 1. login_tbl and 2. users_tbl both contains the 3 fields id,username,password and id,first_name,last_name respectively. now plz help me to write the php code according to this which helps to search the users details in users_tbl and fetch all the records. …

Member Avatar for annyangel
0
170
Member Avatar for Izzah_1

i have created a page which has a table that enables user to delete a record via a delete button but somehow the queary isnt working. php coding <?php include("dbase.php"); $idURL = $_GET['id']; // Connect to database server mysql_connect("localhost", "root", "") or die (mysql_error ()); // Select database mysql_select_db("studiobooking") or …

Member Avatar for diafol
0
336
Member Avatar for vizz

I have six number sets. Each have two digit number which range between 01 to 49. How to create all possible combinations? And how to calculate total number of possible combinations? e.g 1. Number set:- **A B C D E F** 2. Lower Limit:- **01 01 01 01 01 01** …

Member Avatar for diafol
0
355
Member Avatar for João_5

Hello guys, i already have my databases and scripts working, and i was implementing a small webserver under windows 7 with xampp. But after configuring all needed in apache, i can see the pages in the server but non of the clients can see the pages. No error is displayed, …

Member Avatar for cereal
0
777
Member Avatar for Izzah_1

hi need a very big help..and im a newbie in this field im keep getting the same error "Parse error: syntax error, unexpected 'button' (T_STRING), expecting ',' or ';' " here the code : <!--FORM--> <form method="POST" action="BookingnDisplay_Process.php"><!--link to DB--> <br> <h1><center>TALENT STUDIO Booking form</center></h1> <u><strong>Please read carefully.</strong></u></p> <p><strong>1. If …

Member Avatar for JorgeM
0
690
Member Avatar for rtica3

Hello, I have read numerous forums on this issue and is seems each case/resolution is specific to the persons file. I have the same error, but can't find where it is coming from. This is from a wordpress site I did not create - this just appeared out of nowhere …

Member Avatar for EvolutionFallen
0
5K
Member Avatar for João_5

Hello guys, now that i have all my scripts up and running i need some help configuring virtualhosts on Apache/Xampp/Win7 The Httpd-vhosts.conf like this: <VirtualHost *:80> ServerAdmin joao.dias@centralcervejas.pt DocumentRoot "C:/xampp/htdocs" ServerName kadar ServerAlias www.kadar <Directory "C:/xampp/htdocs/" > Options Indexes FollowSymLinks ExecCGI Includes Order allow,deny Allow from all </Directory> </VirtualHost> The …

Member Avatar for pritaeas
0
173
Member Avatar for vbdotnetlover

Sir, I have following codes <?php $country=""; $capital=""; if (isset($_POST['submit'])) { $country=$_POST['text1']; $capital=$_POST['text2']; echo '<script type="text/javascript">alert("The capital of " .$country. "is " . $capital)</script>'; } if (isset($_POST['clear'])) { $country=""; $capital=""; } ?> <html> <head><title>Result on same page</title> </head> <body> <center> <form name="form1" action="same_browser.php" method="post"> Country<input type="text" name="text1" value="<?php echo $country;?>"><br> …

Member Avatar for AARTI SHRIVAS
0
132
Member Avatar for ditty

Hi htaccess is not working in godaddy hosting. but it is working in other servers. Please help me to solve this. Thank you

Member Avatar for mybids
0
173
Member Avatar for saranya@123

hi, i want permutation for all alphabets with word length is 8.but i get only permutation for 4.pls help me to debug this issue code: <?PHP FUNCTION permutations($letters,$num){ $last = STR_REPEAT($letters{0},$num); $result = ARRAY(); WHILE($last != STR_REPEAT(lastchar($letters),$num)){ echo "$last"; $result[] = $last; $last = char_add($letters,$last,$num-1); } $result[] = $last; RETURN …

Member Avatar for pritaeas
0
214
Member Avatar for jdm

I'm working on a insert form for my movie database and I have some code working and will be adding more to it, but I wanted to know if there was a better way to go about doing some of this or if I have made a huge coding error. …

Member Avatar for diafol
0
474
Member Avatar for isaac.iji.5

creating a simple news feed just like facebook is not the problem but instead of posting text i want users to post videos and audios also so other users can watch the videos and play the audio files

Member Avatar for isaac.iji.5
0
120
Member Avatar for saranya@123

hi, i want to display output line by line using jquery.i tried many times but it not works..pls help me.. Html Code: <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"> </script> <script type="text/javascript"> $(document).ready(function(){ $('#sub').click(function(){ $('#msg').html("<center><img src='http://46.16.168.75/saranya/images/9%20(1).gif' alt='LOADING...' width='20' height='20'/>Loading........</center>"); $.ajax({ type: "POST", url: "ping1.php", data: $("#form1").serialize(), success: function(data) { $('#msg').html(data); alert(data); } }); return false; …

Member Avatar for saranya@123
0
1K
Member Avatar for fheppell

I'm changing some things around on my webapp and one of the major changes is assets are now stored in S3 (via filepicker.io) rather than locally. Here is some code I have to generate a zip file from an array of files //example values //loc could be uploads/1/7878837474test.jpg //name coule …

Member Avatar for pixelsoul
0
1K
Member Avatar for yavindu

Can I use <? echo 'somethig'; ?> instead of <?php echo 'something'; ?>. <? ?> tags(without php keyword) working in apache2triad but not in wamp or xampp servers.Why is that.How can I make wamp or xampp to run php codes with <? ?>. Thanks.

Member Avatar for pritaeas
0
58
Member Avatar for saadi06

Hi, I am trying to encrypt a xml to smime format. I am having some problems while creating the encrypted file. This is my code for encrypting the file $signcert = 'file://'.realpath('cert.public.pem'); $privkey = 'file://'.realpath('cert.private.pem'); $pubkey = 'file://'.realpath('ttt.pem'); openssl_pkcs7_encrypt("Sample1.xml", "smime.xml",$pubkey,$headers,0,1); $headers =array(); openssl_pkcs7_sign("smime.xml", "smime.p7m", $signcert,array($privkey, "123456"),$headers ,PKCS7_DETACHED ); This is …

1
88
Member Avatar for mrhankey

hi there, need some urgeny help. is there a way to from my web application php/mysql create an email which will go to outlook and send via outlook? so user uses the web application to input customer details. create message with attachments from the server and then presses a button …

Member Avatar for mrhankey
0
383
Member Avatar for davidjennings

Hi All, I am trying to connect to a database OOP singleton method. I am getting an error "syntax error, unexpected 'function_construct'" and I unable to find the syntax error in the code. Any help with this would be appreciated. Thanks in advance David // Page: index.php <?php require_once 'classes/db.php'; …

Member Avatar for davidjennings
0
827
Member Avatar for marifard

Dear friends on daniweb, First of all hope all of you are ok. I post this article to suggest me some ideas about the attachment of paypal in php. I wish to try a booking site for travelling(as a dummy at this stage). For this, php language is better than …

Member Avatar for marifard
0
376
Member Avatar for nadiam

im trying to get a data from database into a text field: $fothersq=("SELECT others FROM january"); $fothers=mysql_query($fothersq); <input type="text" placeholder="0" name="febothers" size="11" value="<?php if(@$fothers){echo htmlentities(@$fothers);} ?>"> but i got this error in the text field instead. <br /><b>Warning</b>: htmlentities() expects parameter 1 to be string, resource given in <b>C:\xampp\htdocs\CashFlow\febprev.php</b> on …

Member Avatar for nadiam
0
2K
Member Avatar for Sanjay_6

I had created a child theme. So i want to know some basic question about child theme. 1) i had create a child theme.If i am updating the theme, What should be happened ? I mean all customization which i had does manually is remain there in parent theme after …

0
111
Member Avatar for winbala5

Hi all, I had two website in different servers. Both website had same headers. so if login one server website and going to another website i want same session in this website. how to pass the session values to this server. And also if logout server means both servers sessions …

Member Avatar for winbala5
0
278
Member Avatar for strongard63

in a site http://www.example.com/ there are files one of them is called images that contain images when I try to access http://www.example.com/images/ , although the address is 100% true , I get a white blank empty page why??? and how to get the content of http://www.example.com/images/

Member Avatar for strongard63
0
154

The End.