619 Posted Topics

Member Avatar for Mukt@R
Member Avatar for niths

For displaying it back you should use mysql db. So once image is uploaded on server i.e. @ echo "<h1>File Uploaded Successfully! Try again!</h1>"; $newname will be saved in table. After that using select query that $newname will be fetched and shown in image src tag.

Member Avatar for niths
0
149
Member Avatar for mangel.murti

You can go for "cronjob" for this task.hope you know about cronjob. logic: create one table in database.Where fields will be : id, filePath, deleteDate, status set cronjob task daily with one php file. this php file will read table and delete file from filePath on deleteDate and update status.

Member Avatar for mangel.murti
0
162
Member Avatar for LRNPHP

use any good jquery gallery. check this : [URL="http://www.1stwebdesigner.com/design/fresh-jquery-image-gallery-display-solutions/"]Jquery Lists[/URL] Once you download script and demo is working in you pc, replace static images to dynamic images. Dynamic images will comes from select query results.

Member Avatar for vibhaJ
0
105
Member Avatar for ilyas_varol

Its simple as you do code for insert same thing should be there for update. Like insert query here you will have update query. [CODE] <html> <head> <title>Eastern Mediterranean University-Student`s ID</title> </head> <body> <h3>Edit Student</h3> <?php $num=$_POST['num']; @ $db = new mysqli('localhost', 'root', 'ilyas1987', 'dau'); if (mysqli_connect_errno()) { echo 'Error: …

Member Avatar for ilyas_varol
0
100
Member Avatar for marrithl2

also post what you are getting as a result in print_r($productList2) and print_r($totalProductList)

Member Avatar for rajarajan2017
0
83
Member Avatar for mangel.murti

echo $query_string; exit; Check sql query on your domain and execute in sql window, what you are getting?

Member Avatar for mangel.murti
0
118
Member Avatar for goodnohello

put single qoute for LastName as it is varchar. [CODE] global $conn,$dal; $customerID = mysql_insert_id(); $strSQLInsert = "insert into Orders (CustomerID, LastName) values (".$customerID.", '".$values["LastName"]."')"; db_exec($strSQLInsert,$conn); $rs = $dal->Orders->Query("CustomerID=".$customerID." and LastName='".$values["LastName"],"'"); $data = db_fetch_array($rs); $idvalue = $data["ID"]; header("Location: Orders_edit.php?editid1=".$idvalue); exit(); [/CODE]

Member Avatar for rajarajan2017
0
110
Member Avatar for vilasdhobale
Member Avatar for it200219
0
78
Member Avatar for surfgrommett

[CODE] $query5="INSERT INTO $clean_title (recnum,lname,fname,first,credit) VALUES ('$record_number1','$last_name','$first_name','$new','$credit')"; mysql_query($query5) or die(mysql_error()); [/CODE] there is no php code to execute query in your given code. same for $query4.

Member Avatar for metalix
0
310
Member Avatar for mitch9654

Try this : [CODE] <?php $new = htmlspecialchars("'The <font> tag is awesome'", ENT_QUOTES); echo $new; ?> [/CODE]

Member Avatar for mitch9654
0
102
Member Avatar for Member 785582

you should create object of class system_class. then only all function of that class can be used.

Member Avatar for rajarajan2017
0
218
Member Avatar for Member 784017

check this thread. It will help you. [URL="http://www.daniweb.com/forums/thread98678.html"]http://www.daniweb.com/forums/thread98678.html[/URL]

Member Avatar for vibhaJ
0
71
Member Avatar for Member 784017
Member Avatar for sparkles_links

first of all save all uploaded files to your website's folder. Then give url of that location in img src. $aspirant_photo = url of uploaded image $msg .= "Aspirant's Offer:<img src='".$aspirant_photo."' /> \n";

Member Avatar for vibhaJ
0
70
Member Avatar for lf.gene

I think your y.innerHTML string is broken, try to add back slashed before single qoute e.g. beside window.status= [CODE] y.innerHTML='<input type = "text" name = "day"><img src="images/calendar.gif" name="imgCalendar" width="34" height="21" border="0" alt=""><a href="javascript<b></b>: void(0);" onmouseover="if (timeoutId) clearTimeout(timeoutId);window.status='Show Calendar';return true;" onmouseout="if (timeoutDelay) calendarTimeout();window.status='';" onclick="g_Calendar.show(event,'frm.day',true,'yyyy-mm-dd'); return false;"></a> '; [/CODE]

Member Avatar for fxm
0
217
Member Avatar for muralibobby2015

[CODE] <form action="http://www.google.com/translate" > <script language="JavaScript"> <!-- document.write ("<input name=u value="+location.href+" type=hidden>") // --> </script> <input name="hl" value="en" type="hidden"> <input name="ie" value="UTF8" type="hidden"> <input name="langpair" value="" type="hidden"> <input name="langpair" value="en|fr" title="French" src= "http://photos1.blogger.com/img/43/1633/320/13539949_e76af75976.jpg" onclick="this.form.langpair.value=this.value" height="20" type="image" width="30"> <input name="langpair" value="en|de" title="German" src= "http://photos1.blogger.com/img/43/1633/320/13539933_041ca1eda2.jpg" onclick="this.form.langpair.value=this.value" height="20" type="image" width="30"> <input name="langpair" value="en|it" …

Member Avatar for Master Rattley
0
181
Member Avatar for Member 784602

in libmail.php there is function Send(). First of all echo all member of class Mail folowing exit. If all members are Ok, then something is missing with your mail() function.trace mail function. check this below testing email code. [CODE] <?php $to = 'youremailaddress@example.com'; $subject = 'the subject'; $message = 'hello'; …

Member Avatar for rajarajan2017
0
240
Member Avatar for rahul8590

noneed to redirect1.php page. FORM tag should be outside of for loop. [CODE] <?php if(isset($_REQUEST['Submit']) && isset($_REQUEST['name'])) { $allname = $_REQUEST['name']; for($i=0;$i<count($allname);$i++) { $q="insert into user(id,name) values('','".$allname[$i]."')"; mysql_query($q); } header("location:initial.html"); exit; } $val = $_POST['yourname']; ?> <form action="" method="post"> <?php for ( $i = 0; $i < $val ; $i++){ …

Member Avatar for rahul8590
0
109
Member Avatar for an00p

Try this code. [CODE] <?php while($rows=mysql_fetch_array($result)) { $style = ''; if($rows['designation']=="Teamleader") $style = 'style="color:#0000FF;"'; if($rows['designation']=="Manager") $style = 'style="color:#cc0000;"'; echo "<option value=".$rows['username']." ".$style.">".$rows['username']."</option>"; } ?> [/CODE]

Member Avatar for an00p
0
181
Member Avatar for QWaz

your $sql query and return resultset is same for both foreach.so it is little bit ambiguous. Post ur requirement, so anyone can give you logic.

Member Avatar for rajarajan2017
0
101
Member Avatar for umandajayo

I have made this code.. Check this out. [CODE] <table> <?php require "conetion.php"; $query = "SELECT * FROM forms WHERE active = '1' ORDER BY Name ASC"; $result=mysql_query ($query); $total_rows = mysql_num_rows($result); $count = 1; while($row = mysql_fetch_array($result)) { $all[] = $row['Name']; } $halfCount = ceil(count($all)/2) ; $ptr1 = 0; …

Member Avatar for vibhaJ
0
141
Member Avatar for cobrax

What ankit means, [CODE] function fetch_row($resource) { $result = mysql_fetch_row($resource); return $result; } function fetch_array($resource) { $result = mysql_fetch_array($resource); return $result; } $q="select * from user"; $res = mysql_query($q); $output = fetch_row($res ); [/CODE] Firstly check your sql query.Is it right or not? and return of mysql_query should be passed …

Member Avatar for cobrax
0
145
Member Avatar for phaedrusGhost

Here you have echo displayUsers(); meance whatever will be return from that function will be echoed. Your whole function is concating $display and returning it. But in if statement you have directly make echo. [CODE] //THIS IF STATEMENT DISPLAYS WHAT I NEED PERFECTLY if (is_null($avatar)) { echo "<img src=\"avatars/thumbs/default.jpg\"class=\"thumb\" alt=\"Avatar\" …

Member Avatar for phaedrusGhost
0
145
Member Avatar for Charls Frdinand

Try this code.instead of nine conditions. Just for your review. Here you have 3 fields and u r using 3*3=9 if-else, if you will have four fields then?It is not good practice for coding [CODE] if(!empty($_POST['Alumnos'])) { $sql = " (SELECT email FROM alumnos ORDER BY nombre) "; } if(!empty($_POST['Maestros'])) …

Member Avatar for Charls Frdinand
0
141
Member Avatar for kidanr

[CODE] <script language="javascript"> function getXMLHTTP() { //fuction to return the xml http object var xmlhttp=false; try{ xmlhttp=new XMLHttpRequest(); } catch(e) { try{ xmlhttp= new ActiveXObject("Microsoft.XMLHTTP"); } catch(e){ try{ req = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e1){ xmlhttp=false; } } } return xmlhttp; } function getSubCat(strURL) { var req = getXMLHTTP(); // fuction …

Member Avatar for kidanr
0
182
Member Avatar for ivanichi

you mean if there are three option tag then u want to store all in db? not the selected one? Give example here what you want...

Member Avatar for ivanichi
-1
859
Member Avatar for MANASkumarverma

For checking word is there or not: Here is code: [CODE] <? $file='path/to/file.txt'; $data=file_get_contents($file); $findme = 'some word'; $pos = strpos($data, $findme); // Note the use of ===. Simply == would not work as expected // because the position of 'a' was the 0th (first) character. if ($pos === false) …

Member Avatar for vibhaJ
0
52
Member Avatar for dalip_007

<chart caption='COST OF TURNOVER' subCaption='' showPercentValues='1' pieSliceDepth='30' showBorder='0'> is behaving as html tags... So it is coming in output but you wont be able to see it.It can be seen in view source. You want to disply it as a text?? Try this: [CODE] <?php $str = "<chart caption='COST OF …

Member Avatar for dalip_007
0
144
Member Avatar for vibhaJ

Hi all, I am having one music website. where admin upload songs and user can download it after paypal payment. Is there any way admin can provides rights to this song? like DRM rights in original cds. Help !!!!!!!!!!!!!!!!!!

Member Avatar for vibhaJ
0
80
Member Avatar for smi ensi

means you want to know how session works?? you can check session and if not found send user to login page. [CODE] if( !isset($_SESSION['admin_login']) && !$_SESSION['admin_login']) { header("location:login.php"); } [/CODE] during login you can set settion value like below. [CODE] session_start(); include("connexion.php"); if (isset($_POST['login'])and isset($_POST['password'])) { extract($_POST); if (empty($login) or …

Member Avatar for smi ensi
0
124
Member Avatar for dan_t

when user is login save userid in session from that point only. so you can directly use it, $query ="SELECT * FROM databasetable where userId = ".$_session['userId']; $result = ...fetch above query.... $oppositeSql = "SELECT * FROM databasetable where gender != ".$result[0]['gender']; this will give opposite gender's list

Member Avatar for rajarajan2017
0
113
Member Avatar for vibhaJ

I have uploaded all my files on the Apache/2.2.3 (Red Hat) live server. There is htaccess file on the root of website for converting php to html. But it is not working and getting "Internal Server Error". If i blank that htaccess code then it works. I don't know what …

Member Avatar for pritaeas
0
205
Member Avatar for vibhaJ

This problem is on AWS linux instance,in local its working perfact. Here is my flow: this file is:test.php [CODE] require_once('system/config.php'); $_SESSION['name']='test'; echo 'session -name- is:'.$_SESSION['name']; exit; [/CODE] Expected Output: session -name- is:test (its coming.OK) here i have set session value to test. so in page session is now live and …

Member Avatar for vibhaJ
0
152
Member Avatar for Tenaciousmug

check the db entry for 'Dyl' and for login echo sql query for line number 18. Execute that echo sql query in phpmyadmin.does it works? What happends... check and post back.

Member Avatar for ppetree
0
137
Member Avatar for ayesha789

Need selected in if else for each option tag. [CODE] <td> <label>Billing Month <span class="small">Like September-2010</span> </label></td> <td> <? $year = date("Y") ; if(isset($_REQUEST['submit']))// if submit btn is pressed { $b = $_REQUEST['b']; } ?> <select name="b" class="billmonth"/ > <option value=<? echo "January-".$year; ?> <?=($b == "January-".$year)?'selected="selected"':'';?> ><? echo "January-".$year; …

Member Avatar for rajarajan2017
0
135
Member Avatar for healthbasics

You can also use php html parser. Which will fetch title tag, metadata keyword and description from URL. So in index page you can display this fetched title and metadata dynamically from html file, without saving or storing any information.

Member Avatar for vibhaJ
0
78
Member Avatar for eantz
Member Avatar for Geertc

Not sure but you can execute these two query separately. First insert query then execute it and then select query and again execute. Its a trial & error.

Member Avatar for Geertc
0
171
Member Avatar for ayesha789

What is need for inputbox, do you want to save it in db? If yes then here there is no any uniqueid's concept.

Member Avatar for ayesha789
0
135
Member Avatar for ramzmail

this will guide you, [URL="http://devzone.zend.com/article/3336"]http://devzone.zend.com/article/3336[/URL]

Member Avatar for vibhaJ
0
64
Member Avatar for whiteyoh

After importing csv, run this query in sql tab of phpmyadmin. [CODE] alter table tbltest add id int(11) primary key auto_increment not null first; [/CODE] Here tbltest is table name and id is auto incremented field.

Member Avatar for vibhaJ
0
82
Member Avatar for ghost_from_sa

Kindly check whether $_SESSION['loggedIn'] session is flushed away during logout. And what is exact steps and which is not coming in your page bcz of session error?

Member Avatar for ghost_from_sa
0
188
Member Avatar for andydeans

Hi andydeans, Just fix width of the container which is having this note table. (i.e. parent tag of <table width="50%">) not in percentage but in pixel.

Member Avatar for andydeans
0
111
Member Avatar for whiteyoh

If index.php and add.php, edit.php... etc are different php pages then you have to manually create object instance for each page. You can also do all these things like add, edit, delete, search in only one page. which can use one single instance.

Member Avatar for pritaeas
0
96
Member Avatar for wish02

Why there is two form tag???? Use only once after <body><form...> and complete it before</form></body> And --> <select name="category" onChange="submit()"> What is need of onChange submit???

Member Avatar for vibhaJ
0
188
Member Avatar for mr_furley

Hey, ur actpopup funstion is unclear. Here i have define function. hope it works. [CODE] <script language="javascript"> function actpopup(act_id) { var url = "serv_act.php?act_id="+act_id; var opt = "height=175, width=300, location=no, scrollbars=no,menubars=no,toolbars=no,resizable=yes,left=50"; var name = "popup"; window.open(url,name,opt); } </script> [/CODE]

Member Avatar for vibhaJ
0
70
Member Avatar for pgmarco

Hi, [CODE]<?php if(isset($_REQUEST['send'])) { $mydrodown = $_REQUEST['mydrodown']; echo "You have selected ".$mydrodown." from drop down."; exit; } ?> <form id="form1" name="form1" method="post" action=""> <select name="mydrodown"> <option value="computer memory">computer memory</option> <option value="computer parts">computer parts</option> <option value="computer peripherals">computer peripherals</option> </select> <input name="send" value="send" type="submit" /> </form>[/CODE] Here i have given example of …

Member Avatar for pravinkumarr
0
95
Member Avatar for jpakerla

[CODE] <? $currTime = date('H:i'); if($currTime >= "08:00" && $currTime <= "20:00") { ?><a href="#">Time is between 8:00 am - 8:00 pm.</a><? } ?> [/CODE] Try this code.

Member Avatar for matthewl
0
74
Member Avatar for oliv1

Hi, try this code. [CODE] $bedrooms=$_POST['bedrooms']; $bathrooms=$_POST['bathrooms']; $whereStr = ' 1=1 '; if(trim($bedrooms)!='') $whereStr.= " AND bedrooms like '$bedrooms'" ; if(trim($bathrooms)!='') $whereStr.= " AND bathrooms like '$bathrooms'" ; $query= "SELECT * FROM inventory WHERE ".$whereStr." ORDER BY model_name ASC"; [/CODE]

Member Avatar for oliv1
0
112

The End.