39,326 Topics

Member Avatar for
Member Avatar for PerplexedB

Consider my method : static public function mysqldate($c,$f = 'd-M-y'){ // date is supposed to be in dd/MMM/yyyy format. // returns a date in mysql form try { $result = "'" . DateTime::createFromFormat($f,$c)->format('Y-m-d') . "'"; } catch (Exception $e){ $error = "error in mysqldate <br />" ; $error .= "date …

Member Avatar for PerplexedB
0
129
Member Avatar for chrisschristou

hello my Daniweb friend i'm trying to get data from database where only users is connect so i user this code i get a errot on navigator i got this errot on navigator : Parse error: syntax error, unexpected '=', expecting ',' or ')' in /homepages/0/*/htdocs/domainname.com/*/*.php on line 145 this …

Member Avatar for chrisschristou
0
103
Member Avatar for chrisschristou

hello Dear friend i can't explain cause i dont' know why, i'm using the code below to insert data into a myql table but i work fine ust today i get a error colum subtotal can't be null... i' have try too much thing but still same i delete the …

Member Avatar for chrisschristou
0
219
Member Avatar for patk570

I have a database and I have 3 different values that I want to count, to say that You have x amount of tickets open. I am created an array $array = array( 'Pending', 'Waiting on parts', 'Waiting for customer response' ); and a query string $result = mysql_query("SELECT COUNT(*) …

Member Avatar for diafol
0
182
Member Avatar for shrikanthnk

Hi All, Below code gives me exact result which I want.. output gets displayed at div # result which is as per design. Now i wouldlike to know is there any method to display result in textbox? if so please help me. <html> <head> <script type="text/javascript" src="jquery-2.0.3.min.js"></script> <script type="text/javascript"> { …

Member Avatar for diafol
0
583
Member Avatar for venkyb47

The following code used in productlist.php // some code manipulation to generate new values $filetodownload = 'DoubleClick to run.txt'; $filehandler=fopen($filetodownload,"w"); fwrite($filehandler,$generatedValue); fclose($filehandler); header('Content-Description: File Transfer'); header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename='.$filetodownload); header('Content-Transfer-Encoding: binary'); header('Expires: 0'); header('Cache-Control: must-revalidate'); header('Pragma: public'); header('Content-Length: ' . filesize($filetodownload)); ob_clean(); flush(); readfile($filetodownload); header('Location:druglist.php'); After file downloaded page …

Member Avatar for venkyb47
0
3K
Member Avatar for PriteshP23

Hello, I would like to solve form validation and filename problem. Here is my code: /************************** Step 1: Select Cell************************************/ if(isset($_POST['SmartPhone'])) $checked1=$_POST['SmartPhone']; $form->add_checkbox('SmartPhone','SmartPhone',$checked1); if(isset($_POST['Apple'])) $checked2=$_POST['Apple']; $form->add_checkbox('Apple','Apple',$checked2); /************************** Step 2: Select Model************************************/ if($_POST['SmartPhone']==false and $_POST['Apple']==false) { $this->add(new error('<span style="color:red">Select your cell..!!</span>')); $this->step1(); return; } if(isset($_POST['S4'])) $tech2=$_POST['S4']; $form->add_checkbox('S4','S4',$tech2); if(isset($_POST['iPhone 5'])) $tech3=$_POST['iPhone 5']; …

Member Avatar for andreiviziru
0
418
Member Avatar for prateek_chandra

Hello, I am just a beginner and I need some help. Can anyone please provide me an article on PHP.

Member Avatar for veedeoo
0
83
Member Avatar for shrikanthnk

<?php SESSION_start(); if(!isset($_SESSION['email'])) { echo"access denied"; exit; } else{ $email=$_SESSION['email']; include("menu.php"); $num=$_SESSION['num']; $date=date("Y/m/d"); } ?> <html> <head> </head> <body> <div style="position:absolute; top:143px; left:292px; width:999px; height:244px; background-color:pink; border-radius:15px;"> <table> <form enctype="multipart/form-data" action="" method= "POST"> <tr><td>Document Type:</td><td><select name="doc_type" > <option value="police report" selected="true">Police report file</option> <option value="medical report">Medical report file</option> <option value="purchase …

Member Avatar for shrikanthnk
0
168
Member Avatar for klemme

Hi all, I am trying to lay out a plan for my classes, and havent godt the most experience in oop yet. I am using an abstract class, to be able to have a more clear overview and keep the project easier to manage. SO: I have created two abstract …

Member Avatar for diafol
0
329
Member Avatar for devianleong

This is my code : for($i = 0;$i<$count1;$i++){ echo '<select name="attribute['.$i.']">'; while($parent = mysql_fetch_array($query)){ //echo $parent['Name']; echo '<option value="'.$parent['ID'].'">'.$parent['Name'].'</option>'; }//while $parent echo '</select>'; }//for loop My problem is why the output like this?: <select name="attribute[0]"> <option value="2">Colour</option> <option value="3">Size</option></select> <select name="attribute[1]"></select> Why this line does not contain the both option …

Member Avatar for devianleong
0
235
Member Avatar for johmny

hello to all the members which one is better php or asp.net to create the dynamic website

Member Avatar for diafol
0
150
Member Avatar for mmcdonald

I've focused my night on better grapsing authentication security and believe I have made good progress. To date I have simply relied on SHA1 hashing and prepared statements - not much, right... So I knew it was time to pick up some new skills. What I came across was very …

Member Avatar for diafol
0
290
Member Avatar for leokuz

For some reasone everytime I enter either correct mine or someone else's valid email and password, I get message: Sorry, your credentials are not valid, Please try again. What is wrong with this form?

Member Avatar for tpunt
0
394
Member Avatar for venkyb47

When I type URL file://///server01\PUBLIC\PEG\ in browser address bar, browser redirecting to that location and shows the documents available. But when I use same url in href browser not redirecting to the href location. <?php echo '<a href="file://///server01\PUBLIC\PEG\">click here</a>'; echo '<a href="file://///server01/PUBLIC/PEG/">click here</a>'; ?> php code is not working. When …

Member Avatar for cwarn23
0
275
Member Avatar for tibormarias

Evening Sirs! Well I have a quiet emberrassing problem caused by i don't know what, but I would like to get rid of this issue. I have a login with session open every .php document. But when I try to open the following file, it stops my session. This is …

Member Avatar for tibormarias
0
235
Member Avatar for Priti_P

Hello, First of sorry I dunno where should I put this question. @admin if it is not supposed to be put here then plz provide me path so taht I will put the same there. My doubt is. Internal website is developed in Drupal 6 I wanted to create its …

Member Avatar for maori
0
88
Member Avatar for kate.negley

Hi there, I created a basic website running off Wordpress. I then customized the theme. The website is up and running, fully functional. But now when I try to login to the Wordpress dashboard to edit the pages, I see a blank white page with this error: Warning: Cannot modify …

Member Avatar for kate.negley
0
431
Member Avatar for johndohmen1963

I have a question hw can i ad 18 years to the folowing date $rowy_geboorte_datum = new DateTime($rowy['geboortedatum']); $geb_dat_echtgenote = date_format($rowy_geboorte_datum, 'd-m-Y'); $rowy['geboortedatum'] is from a mysql data table and could even before 1902 as example 1820-06-10 thanks in advice John

Member Avatar for mmcdonald
0
144
Member Avatar for praba_web

whenever i open phpmyadmin it showing that access denied and #1045 - Access denied for user 'root'@'localhost' (using password: YES) phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they …

Member Avatar for mmcdonald
0
220
Member Avatar for Ozzzi

Hello , I'm in some trouble regarding the following code.I must state first that I'm a beginner in programming, and that I've tried to understand other solved solutions before crying for help , but with no luck.Had tons of errors and a lot of frustration ; almost gave up(work on …

Member Avatar for Ozzzi
0
575
Member Avatar for slyme

Hi, thanks for looking at this post. I have searched and experimented and after hours of getting really close I have finally admitted to my self that I'm going to have to stop and ask directions! So, I want the browser address http://drivingmeinsane/Join to be re-written to http://drivingmeinsane/?page=Join I've come …

Member Avatar for slyme
1
367
Member Avatar for aVar++

How do I check if a query has returned a value or not because this isn't working? I swear I have done it before but I can't work out why it isn't working. echo "<form action = 'NoughtsAndCrosses.php' method = 'POST'> <input type = 'text' name = 'game_search'> <input type …

Member Avatar for aVar++
0
227
Member Avatar for GlenRogers

I have a dropdown box to choose topics from a discussiob board so i can then view all the replies for deletion etc. At the minute when I choose a topic i then press a submit button and get all the answers. But is there any wayt i could have …

Member Avatar for diafol
0
170
Member Avatar for Danny_3

I want to create a REST api using php for my website so that, my app can access the data stored in the database. I need for the user to be able to log in to the server through the app and i am unsure of how to implement this …

Member Avatar for phorce
0
451
Member Avatar for Paul_17

Hi Guys, Been talking to a friend about my code I have been working on.I could not figure out how for the life of me to check whether an email or code in my database is already in use. So just to cool down for a bit i put conditions …

Member Avatar for Paul_17
0
908
Member Avatar for Shikha_1

<center><table border="2"> <tr><td><p><center>YOUR SCHOOL IS </center> </p></td></tr> <tr> <td colspan="2" id="combo"> <?php require("Dbconnect.php"); $qry="select class_id,class_name from master_class"; $result=mysql_query($qry); echo "FROM"; echo "<SELECT name='combo1' size='3' >\n";/* creating Ist drop down*/ while($row=mysql_fetch_array($result)) { echo "<option value='$row[0]'>$row[1]</option>\n"; } echo "</select>"; $qry="select class_id,class_name from master_class";/* creating 2nd drop down*/ $result=mysql_query($qry); echo "TO"; echo "<SELECT …

Member Avatar for bradly.spicer
-2
149
Member Avatar for fheppell

I have a problem with one of my php scripts. I've got a file called view.php. If I go to test.com/view?id=7575 it comes up with a 404 error. However if I go to test.com/view.php?id=7575 it works. Why is this?

Member Avatar for gogs85
0
205
Member Avatar for gogs85

I have this url:http://localhost:8080/skolski_portfolio/index.php?id=main&page=portfolio and i want to be http://localhost:8080/skolski_portfolio/portfolio then i make this rule in .htaccess RewriteEngine On RewriteRule ^([^/]*)/([^/]*)\.html$ :8080/skolski_portfolio/index.php?id=$1&page=$2 [L] i have error! How to fix this?

Member Avatar for cwarn23
0
97
Member Avatar for madmax9922

i have a problem to redirect user to the requested page after login. 1-this are my files:login.php,register.php,protected.php,plan1.php,member.php et plan2.php,home.php 2-plan1,plan2, and member have a check before people have access. 3-when a user click on plan1 for exemple and get redirect on login.php 4-My problen is after logged in he goes …

Member Avatar for madmax9922
0
42K

The End.