52,566 Archived Topics
Remove Filter ![]() | |
how do i rewrite the following code using the ternary operator [CODE] if ( isset( $page_title ) ) { echo $page_title; } else { echo 'Welcome to Auto-Zim'; } [/CODE] thanks in advance Web Development php | |
Hello all. The problem: I have started a session. Now I would need to set an expiry time (24 hours) on the cookie it creates (if it creates it). How do I achieve this? Thanks to all, who anwsers. | |
I have a block of JavaScript code that is designed to be embedded into any web page. It displays a list of items from a database. In the .js file is actually a lot of PHP code within JavaScript. The problem: The cut-n-paste widget does not actually show up. It's … Web Development apache javascript web-browser | |
hi i just started php, my code works on ie, bit when i open the webpage on firefox and chrome the image does not display?, can anyone help [CODE] $car = "C:\wamp\www\porche.jpg"; $banner = "<img src=\"$car\" "; $banner .= "width=\"380\" height=\"110\" border=\"0\" >"; echo($banner); [/CODE] Web Development file-system image php | |
I am trying to send results to a new page.The results are fine. i.e. once the form is submitted and all input validated I want the result to appear on the results.html page. I have been able to display the results.html but no data displayed. I attach some relevant code: … | |
i referred a site which said that using the include() we can include code of another page into the current page But i am not getting the output as they showed. this is my code [CODE] <html> <head> <style type="text/CSS"> body { background-color:#696565; font-style:italic; } h1 { color: green; text-decoration:underline; … | |
HI i am trying to convert a doc file to a pdf file. please see my conversion code below [CODE] private string m_SourceFilePath; private string m_DestFilePath; public bool DoConversion() { bool returnValue; Word.WdExportFormat exportFormat = Microsoft.Office.Interop.Word.WdExportFormat.wdExportFormatPDF; object paramMissing = Type.Missing; Word.ApplicationClass wordApplication = new Word.ApplicationClass(); Word.Document wordDocument = null; try … Web Development asp.net dataset microsoft-access microsoft-office pdf web-browser windows-server windows-vista | |
Hi, I am a new PHP developer. Actually just started today and I wanted to know which MAMP stack to use ? I came across MAMP and AMPPS : [url]http://www.mamp.info[/url] [url]http://www.ampps.com[/url] Which one should I use ? From the looks of it I think AMPPS is easy to use. I … | |
Can anybody tell me How to access Asp.Net Application using Desktop (VB.Net) Application...? I Had developed one Asp.net App., & there is one DesktopApplication developed in VB.Net, which reads the Information using BarCodeReader.... I want to AutoFill up Asp.Net Page with that data. How can i do this..... | |
Good day... I am new to javascript... I created a simple validation using javascript alone.but my problem is when I press enter the browser aumatically refresh.. this is my code js code.. [CODE]var validid=false; var validname=false; var validaddress=false; var validzip=false; var validemail=false; function idiit() { var uid = document.form1.userid; var … Web Development html-css javascript ![]() | |
I have created a form that uses a drop-down box to save information to a MySQL database using a php script I wrote. That works perfectly, but the problem I have is when I am trying to edit the information in the database. I have created an edit form that … | |
Can anyone tell me how to do this? | |
Hello to all, I am trying to solve this problem but i did not find the solution. please help me to find the solution. Error: Column count doesn't match value count at row 1 [CODE]<?php $con = mysql_connect("localhost","root",""); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("hotel", $con); … Web Development php | |
Hi I need to add the following sample url, [url]http://www.mysite.com/home[/url] to my .htaccess file to redirect it to the following url: [url]http://www.mynewsite.com/welcome[/url]. I've seen that my htaccess uses RewriteCond, and tried a code like this: RewriteCond %{HTTP_HOST} ^www\.mysite\.com/home$ [NC] RewriteCond ^(.*)$ http://www.mynewsite.com/welcome$1 [R=301,L] However am getting Internal Server Error 500. … Web Development php | |
[CODE]<?php include 'connection.php'; $qry = mysql_query( "SELECT g.totalDaily, p.COUNT(DISTINCT bodyNo) AS qty FROM grandTotal AS g, paintshop AS p ") or die('error'); while ($rows = mysql_fetch_array($qry)){ ?> <td><?php $dpu = $rows['g.totalDaily'] / $rows['qty']; echo $dpu;?></td> <?php } ?>[/CODE] i want to display the $dpu which is defect per unit..the information … | |
hello everyone! I have a php blog once again that I can't seem to get to work..when I register an admin to all the editing options and what not..the processing gets weird..instead of outputting all the other errors..it simply goes to the error "User Not Added". Did the script skip … | |
Hello, I'm trying to create user registration for a class website using WAMP. I have the register and activation pages working, but I am getting the same error for login, logout, forgot password, etc pages. The error is: An error occurred in script 'C:\wamp\www\login.php' on line 42: Cannot modify header … Web Development php | |
Hello, I have been beating my head over this issue for almost a week now. I have my pages setup to where the user can register and I can display these members. Here is where it gets fun. Where the applicants are display they are in the rows so that … Web Development php | |
Hello Daniweb, I've searched all over including a few threads here on this topic and it looks like I'm running out of options. I'm developing a travel reservations website with a promotional code field on the payment page. The admin wants to be able to create coupon codes with an … Web Development php | |
Hi, I have index.php on root. Session register using $_session['user'] and redirected to abc/demo.php session not working in directories . but on this location abc/demo.php session not working. is that any [B]setting in php.ini[/B] or anything? Same thing [B]working on local[/B](xampp) [B]but on working on live[/B] server. How to solve … ![]() | |
Hello i just want to ask you guys if you can help me with this problem: I need to write an javascript that writes out chess board like table, and that table must include onclick function that changes background color of that cell that is clicked on. I would really … Web Development html-css javascript | |
Hello, I'm creating a blackjack game,and would like the function cardToString to return the file name of a card e.g "AceDiamonds.gif" and fill an array called deck,its only returning one card and not filling the array thank you in advance [CODE]<script> var dealer_hand = new Array(); var player_hand = new … Web Development javascript | |
I have two dropdown menus. 1st -> Drop Down Menu (name="optionDrop") has 5 values which are "ABC", "ABCD", "ABCDE", "True or False" and "Yes or No". 2nd -> Drop Down Menu (name="numberDrop") has 5 values which are "","1", "2", "3" and "4". Now this is what I want to achieve: … Web Development display javascript | |
trying to create a simpleprogram that will read a text file and output information and calculations using the data in the text file. I have 4 radio buttons which represent an item Number. when one is selected the output form should print to a table the ID,Part,Count, Price, and the … Web Development php ![]() | |
Hello all of you . I'll try to explain what I want as clear as possible and if there will be some type of things that yo are unclear with please let me know . I built a live chat using PHP and MySQL (It's a chat programme where when … Web Development php | |
Hello, I'm coding a site in php, and i want to add another language/ I used poedit to do po file I used the _e() func, e.g _e('hello world') but when i tried to run the site in the localhost, i get an error. but when i changed the func, … Web Development php ![]() | |
I will try to explain as simple as i can [B]head section[/B] <script type="text/javascript"> function randomnumber() { document.forms[0].randomnumber.value=(… } onload=randomnumber </script> [B]body section[/B] <div class="ss-item ss-text"><div class="ss-form-entry"><label class="ss-q-title" for="entry_13">Booking ID </label> <label class="ss-q-help" for="entry_13">To trace ur record</label> <input type="text" name="entry.13.single" [COLOR="Green"][B]value=""[/B][/COLOR] class="ss-q-short" id="entry_13"></div></div></div> the normal way to see my random … Web Development javascript | |
On a MySQL table the Date column is set at YYYY-MM-DD with some dates shown as 0000-00-00 (Default set at NULL) where no date is available. This is OK until I display the web page that contains the php code for the SELECT query. All the 0000-00-00 dates are displayed … | |
Hey guys next question :(. Now I have having troubles with the IMAGE data type, can anyone provide examples on how to retrieve and update the image? I have tried the following: [CODE] [size=2][/size][size=2][color=#0000ff]Dim[/color][/size][size=2] imgdatastream [/size][size=2][color=#0000ff]As[/color][/size][size=2] FileStream [/size][size=2][color=#0000ff]Dim[/color][/size][size=2] imgdatalen [/size][size=2][color=#0000ff]As[/color][/size][size=2] [/size][size=2][color=#0000ff]Integer [/color][/size][size=2][/size][size=2][color=#0000ff]Dim[/color][/size][size=2] imgtype [/size][size=2][color=#0000ff]As[/color][/size][size=2] [/size][size=2][color=#0000ff]String [/color][/size][size=2][/size][size=2][color=#0000ff]Dim[/color][/size][size=2] n [/size][size=2][color=#0000ff]As[/color][/size][size=2] [/size][size=2][color=#0000ff]Integer [/color][/size][size=2]imgdatastream … | |
When a person logs into my site i need to check a value in a database for their roleid, and dependent on that i need to allow/deny access to a page. I have this code but it says that the $_SESION variable 'Access' is undefined, i cant see why? [CODE] … Web Development php ![]() | |
Right. Im trying to communicate with the expedia travel API, exchanging xml feed with them. It goes somehow like this: I send them info of the query I want, they send me the query back in xml form. Here is an example of a query I would want to send … | |
Hi every body i was create some forms for uploading files. when i tried to upload some files with less than a MB there is no problem and it works well but when the size of file that i want to upload it, is over than 10 MB i faced … Web Development file-system php | |
Hello, I am new to javascript. I am trying to get the cell values of a html table in the following way, but I am not able to increase the variable dynamically! Does any one see where is my problem Sorry for my english!! [CODE] function validateRow(frm) { var oTBL … Web Development javascript | |
Hey, I have a database of events... and I need to add a row for each day for a year... so there will be 365 rows in the database, but the date format must be as follows: Row 1 Start Date: 2012-01-01T00:00 End Date: 2012-01-01T23:59 Row 2 Start Date: 2012-01-02T00:00 … | |
Hey, My code epic fails... I get delivery failed when sending an email to the email addess that pipe's to this script: [CODE]#!/usr/bin/php -q <?php ini_set('memory_limit', '256M'); //The concern here is having enough mem for emails with attachments. // read from stdin $fd = fopen("php://stdin", "r"); $email = ""; while … | |
Hi all, been lurking for ages and though I'd join to ask the following: I have created a PHP script which'll automatically carry out a series of actions which'll save a lot of people a lot of time. It's highly configurable and comes in at ~350 lines of code. I … Web Development php | |
[B][U]1.User.jsp[/U][/B] [CODE]<form action="register" method="post"> First Name : <input type="text" name="firstName" /> <br /> Last Name : <input type="text" name="lastName" /> <br /> Email : <input type="text" name="email" /> <br /> Username : <input type="text" name="uName" /> <br /> Password : <input type="password" name="password" /> <br /> <input type="submit" value="Register" /> … Web Development java-jsp | |
Guys i have a <select id="select1" runat="server" /> control on a web page i have used a javascript to populate the items of the <select> on runtime now i want to know how to access there elements of <select> (selectedIndex or selectedValue) by asp vb.net Thanks in advance :) Web Development asp.net | |
I am trying to create a web app using C# 2005 where I can upload an excel document, store it in memory and read the contents. I have my code working if the file is saved on the hard drive, but i don't want to have to save the file … Web Development app-store asp.net hard-drive microsoft-access open-source | |
IM new to Ruby and RoR. I have very less prior experience with web techs. I know how web works and worked with pre coded php code (edited em)... and ran websites with template scripts and wordpress cms. But never built em on my own. Now I wanna learn a … | |
Hi guys, I am working on something that is driving me crazy, I'm just trying to get my php skills better and so the help with this or guide in the right direction will be a greatly appreciated. the script for this looks like this [CODE]<html> <head> </head> <body> <table … Web Development php | |
Hi I have a phpcode that fetches data from database , I want to lock a row when a user reads that row and want to release it when he exits. Can any one help me plz Web Development php | |
Hi.. I need some help. I have a problem to insert 2 values or variable from drop down list to database at the same time. i want to insert name_relation into db, at the same time want to insert IcNo into db. here my code: [CODE]<?php include ("ConnectDB.php"); ?> <select … Web Development php | |
Hi All, I have a "Change Password" script I am battling a bit with. At first I could not get the update to recognise the correct user and now that I have that sorted and the update does insert the new hash value for the correct user I cannot login … | |
Hi, In my server, just i have installed XAMPP with the PHP version 5.3.1 and the apache version Apache/2.2.14 (Win32) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l mod_autoindex_color PHP/5.3.1 . Am having a website, its run using http protocol : [B]http:[/B]//www.example.com I wants to make it to [B]https:[/B]//www.example.com I don't how to complete this … Web Development apache http-protocol php | |
Hello, it's me with oop again, So now I understand what are oop and how to use it, but I have 2 questions: [1] - How to use controllers models views libs [2] - Is there any tutorial on how to create a cms using oop even if I should … | |
Hi there, please someone suggest a php code for changing site background image/color in every 30 minutes... I have 10 images 1.jpg to 10.jpg in www/images folder. I have.... body { .... ... ... ... ... ... background: .... url('background.php') 50% 0 fixed; background-color: .....; } in style.css what will … ![]() | |
Greetings, I am trying to write XML using SimpleXML for a web service call. I was having success until the XML got a little more complicated. Here is the XML format where I am running into problems: [CODE] <Agent> <Person Last='Smith' First='John'> <Addresses /> <PhoneNumbers> <Phone Type='1' Number='888-555-1212'> </PhoneNumbers> </Person> … Web Development office-suite php xml ![]() | |
I'm sure this has an easy answer, but I don't know it. so I have a widget that will let you get alerts texted to a phone. I am trying to store the info, but I can't get the user's input into my javascript function shown below: [CODE]onClick="collect('info', 'nname=' + … Web Development javascript | |
Hi all, I am completely new to Ajax, I need to create Telephone directory. Telephone numbers and phone are in database, I designed UI like two text boxes for search by name search by number. I have one div which displays the search results. It is a J2ee application, I … Web Development database-design javascript |
The End.