- Upvotes Received
- 3
- Posts with Upvotes
- 3
- Upvoting Members
- 3
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
I am a web programmer, i work freelance to build a website
29 Posted Topics
Re: try to change short tag <?= with <?php echo in your script below: <?php include('array.php'); ?> <?=$thingsthatchange['unique_string'];?> become <?php include('array.php'); ?> <?php ehco $thingsthatchange['unique_string'];?> It is maybe your server not supported php short tags. | |
Re: [QUOTE=calebcook;1610434]I've tried [CODE]<?php $data = 'aaa <div class="main">content</div> bbb'; preg_match_all ("/<div.*?>([^`]*?)<\/div>/", $data, $matches); echo print_r($matches, true); ?>[/CODE] That displays: [CODE]Array ( [0] => Array ( [0] => content ) [1] => Array ( [0] => content ) )[/CODE] I want it to just display 'content'. Can someone help me with … | |
Re: Trying this simple example of CSS dropdown menu [URL="http://www.leakbali.com/script/7/simple-css-dropdown-menu/"]http://www.leakbali.com/script/7/simple-css-dropdown-menu/[/URL] Good luck | |
Re: add ul element in the CSS you marked that not worked [CODE] #navMenu ul li:hover{ background : #09F; } [/CODE] | |
I have more than 420,000 rows articles in my table. I just want to query a data which is has only one row, but it takes too long.. any suggestion? database : mysql, Storage engine : MyISAM mysql_query("SELECT id, title, ... ,postdate FROM table_name WHERE id = 1 the result … | |
Re: Trying this CSS, [CODE] @font-face { font-family: [COLOR="Red"]Font1[/COLOR]; src: url('http://www.yourdomain.com/fonts/INKBURRO.TTF'); } @font-face { font-family: [COLOR="Green"]Font2[/COLOR]; src: url('http://www.yourdomain.com/fonts/SCRIPT.TTF'); } #fontface1{font-family : [COLOR="Red"]Font1[/COLOR]; padding : 10px; margin : 0 auto; text-align : center; font-size : 30px; line-height : 1.3em} p{font-family : [COLOR="Red"]Font1[/COLOR];} #fontface2{font-family : [COLOR="Green"]Font2;[/COLOR] } [/CODE] | |
Re: [QUOTE=Nahiyan;1616482]Hi, I am making a mini cms for managing my website and to increase my php skills so I wrote some code to give out the result of a query by using mysql_result(..,..,..); but when I tried to echo it out, the php code which is stored in my database … | |
Re: [QUOTE=chrishea;1616463]Keep in mind that PHP is running on the server while your HTML code (including the <input statement ) runs in the browser on the desktop / laptop / phone etc. The only way that the PHP program on the server gets to see the user input (unless you are … | |
Re: Here an example using CSS visibility, edit menu on each comment will appear every time you point mouse to each comment. see the result in "[URL="http://www.leakbali.com/script/editcontent.php"]View edit menu using visibility CSS[/URL]", and download the [URL="http://www.leakbali.com/script/21/view-edit-menu-with-css-visibility/"]complete code[/URL] [CODE] <html> <head><title>View Edit Menu with CSS</title> <style> .comment{margin : 10px 0; width : … | |
Re: In .htaccess file create the code below : [CODE] RewriteEngine on RewriteRule ^s/([0-9]*)/?$ s/index.php?i=$1 [L,QSA] or RewriteRule ^([0-9]*)/?$ index.php?i=$1 [L,QSA] [/CODE] Remember if you use rewriterule using .htaccess in your local server (the case i'm use xampp), you must uncomment the line: LoadModule rewrite_module modules/mod_rewrite.so in file httpd.conf for default … | |
Re: Hi, trying this code [CODE] <!doctype html public "-//W3C//DTD HTML 4.0 //EN"> <html> <head> <title>Your Output</title> </head> <body> <h1>Your Output</h1> <div style="text-align : center"> <?php $basicText = $_REQUEST["basicText"]; $borderSize = $_REQUEST["borderSize"]; $borderStyle = $_REQUEST["borderStyle"]; $sizeType = $_REQUEST["sizeType"]; $theStyle = "border-width:$borderSize$sizeType; border-style:$borderStyle; border-color: green;" print "<div style = '".$theStyle."'>"; print $basicText; … | |
Re: Add this code on your if uploaded path [CODE] if (is_uploaded_file($_FILES['file']['tmp_name'])) { move_uploaded_file($_FILES['file']['tmp_name'], 'uploadfolder/'.basename($_FILES['file']['name'])); } [/CODE] | |
Re: Use complete url in your action attribute in your form [CODE] old <form action="http://localhost/project_example/submit.php" methode="get"> new <form action="http://localhost/project_example/submit/" methode="get"> [/CODE] ![]() | |
Re: <br> is an empty tag, it must close on open tag. In XHTML <br> tag must close in open tag, <br /> | |
Re: Trying this simple login form [CODE] <?php session_start(); //db connection $nameserv = "localhost"; $username = "root"; $pass = ""; $dbname = "daniweb"; $conn = mysql_connect($nameserv,$username,$pass)or die(mysql_error()); $selectdb = mysql_select_db($dbname, $conn); $login = $_POST['login']; if(isset($login)){ $usrname = $_POST['username']; $password = $_POST['password']; $upass = MD5($password); //validate input if(empty($usrname)){ $msg = "Empty Username!<br … | |
Re: Check in your external css, there is any style control fieldset element? [CODE] <fieldset> <legend accesskey="I">Search Offers</legend> <table> ... </table> </fieldset> [/CODE] | |
Re: [QUOTE=luceduce;1611150]Hi all, I've written some code which seems to be working when isolated on testing pages, however, as soon as I integrate the codes within my site files, the code no longer works. [B]What the code does:[/B] currently, when the first page loads, you have an option of which template … | |
Re: That script work on live server or in your local server? If work in local server, sent email will not work. You must install email server in your localhost. | |
Re: Please trying this, update your code in line 30, 31: [CODE] $sql ="SELECT ad.firstname, ad.lastname, ad.address, ad.city, ad.state, ad.zipcode, ad.dhtmlgoodies_category, ad.dhtmlgoodies_subcategory, ad.caryear, ad.customerid, ad.servicedesc, aj.email, aj.areacode, aj.phoneprefix, ad.clientID, aj.phonesufix, aj.cellareacode, aj.cellprefix, aj.cellsufix, aj.commentonclient FROM additional_cars as ad JOIN ajax_client as aj ON ad.[COLOR="Red"]xxx[/COLOR] = aj.[COLOR="Red"]xxx[/COLOR] WHERE ad.clientID='".$clientId."' group by ad.clientID"; … | |
Re: [QUOTE=urtrivedi;1610572]I am not sure, because I do not know what do you mean when you say, "It does not works". I think reason could be multiple forms.[/QUOTE] It doesn't work because you use multiple form, and you don't send the value of each data to file delete.php. Change code in … | |
Re: [QUOTE=klemme;1611147]Hi all, I have this mail which works fine: But how can I pass the html tags, as html tags so it shows bold in my inbox? As it is now, i recieve the tags as normal letters.. This is what I have: [CODE] if(empty($error_msg)) { // If validated -> … | |
![]() | Re: @megachip04 : you must add session_start(); in the first line after php tag. It must be error like this if you put session_start(); after any code. [CODE] Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at E:\xampp\htdocs\daniweb\session.php:1) in E:\xampp\htdocs\daniweb\session.php on line 2 [/CODE] |
Re: Trying to add style to the element, like example below: [CODE] div{overflow : auto;} [/CODE] | |
Re: [QUOTE=Isti666;1610283][code=php]<?php //first you need to define db info define('mySQL_hostname', 'localhost'); //database IP define('mySQL_database', 's'); //database name define('mySQL_username', 's'); //database user define('mySQL_password', 's'); //database password //connects to mysql $db_link = mysql_pconnect( mySQL_hostname, mySQL_username, mySQL_password ) or die( 'Error connecting to mysql<br><br>'.mysql_error() ); //connects to Database $db_select = mysql_select_db( mySQL_database, $db_link ) … | |
Re: [QUOTE=phaedrusGhost;1610317]another quick question...if I am joing 3 tables would I just add JOIN table_whatever again after the last JOIN?[/QUOTE] Yes, if you want to joining 3 tables, you just add JOIN table_whatever. [CODE] SELECT * FROM table_A AS a JOIN table_B AS b ON a.id = b.id JOIN table_C AS … | |
Re: Please try this, [CODE] <html> <head> <title>Header Template</title> <style type="text/css"> div.header{ border-style:solid; border-width:2px 0px 2px 0px; border-color:#999999; padding-top:3px; padding-bottom:1px; display:block; width:100%; } p.header{ font-family:"Times New Roman", Times, serif; font-size:20; letter-spacing:4; display:inline; width:100%; } div.header2{ display : inline; width : 100%; } p.header2{ font-family:"Times New Roman", Times, serif; font-size:20; letter-spacing:4; display:inline; … | |
Re: Trying this: [CODE] RewriteCond %{HTTP_HOST} ^/?forum [NC] RewriteRule ^([\w]+)/([\w]+)/?$ index.php?p=$1&s=$2 [NC,L,C] RewriteRule ^forum/?$ index.php?p=forum [NC,L] RewriteRule ^([\w]+)/?$ index.php?p=$1 [NC,L] [/CODE] | |
Re: Trying this, [CODE] <style type="text/css"> <!-- a:link { color: #400000; text-decoration: none; font-weight: normal} a:visited { color: #400000; text-decoration: none; font-weight: normal } a:active { color: #400000; text-decoration: none } a:hover { color: red; text-decoration: none; font-weight: none } ul#fullylinked{ float:right; margin-right: 10px; bottom: 140px; } --> </style> <ul id="fullylinked"> … | |
Re: You may try this, same like the way above for the link in body you can use css like this [CODE] a{color : #FF0000; text-decoration : underline} [/CODE] the html example [CODE] this is a <a href="http://www.leakbali.com">link</a>. this is a link. this is a link. this is a link. this … |
The End.