79 Topics

Member Avatar for
Member Avatar for rayrenz

$string="City" $consonants=array("B","b","C","c","D","d","F","f","G","g","H","h","J","j","K","k","L","l","M","m","N","n", "P","p","Q","q","R","r","S","s","T","t","V","v","W","w","X","x","Y","y","Z","z"); foreach($consonants as $chk2) { if(strpos($string,$chk2)!= false) { $ans2[]=$chk2; } } if(isset($ans2)) { $comment2="Consonants in this string: ".join(" ",$ans2); } else { $comment2="Consonants in this string: None"; } echo "".$comment2."<br/>"; so the error is that the displayed consonants does not include the first letter. what could be wrong?

Member Avatar for Aravinth_2
0
366
Member Avatar for SirMahlon

i have an echo statement. which am looping columns. and i want to use this onerror command <img src="http://subinsb.com/to-an-image" onerror="this.src='img/delogo.jpg';"/> but not working. how do i do this. thanks echo ' <div class="col-lg-5 col-md-5 col-xs-12"> <h4 class="font_head_check">' . $title . '<span class="box_type_unik">For Sale</span></h4> <p class="font_check">' . $town . '</p> <span …

Member Avatar for diafol
0
1K
Member Avatar for Niloofar24

Hi. There is a textarea in my page. I type a text in the textare and then in the script there is: $text = nl2br(htmlentities($_POST['text'])); Now what is the problem? When i type: `I'm fine.` It will be sent to db and will be printed, in both place as: `I'm …

Member Avatar for diafol
0
362
Member Avatar for Niloofar24

Hi. With `$u_agent = $_SERVER['HTTP_USER_AGENT'];` i can get the users information but i just want to echo the OS that users use, something like: Linux,Ubuntu How can i get this out from the $u_agent variable?

Member Avatar for Niloofar24
0
5K
Member Avatar for Niloofar24

Hi. I'm working on my own CMS, i want the script to echo 3 posts in every page, and want the script to echo from the recent post and back to the oldest post. I mean like this: For example there is totaly 30 posts; First page => posts 30-29-28 …

Member Avatar for Niloofar24
0
391
Member Avatar for Niloofar24

Hi. In my CMS, when i type a content for a new post in the textarea, like this: one two three four five six and then click the submit button, it will save in the db table like the way i have typed, every word in a separate line. But …

Member Avatar for Niloofar24
1
1K
Member Avatar for connoisseur2010

Hi ... I wrote a script to send a feedback form to an email. Here's the script below; //PHP CODE: <?php session_start(); $submitted = FALSE; ini_set("SMTP","mail.sitecghana.com"); if (isset($_POST['send_message_button'])) { $submitted = TRUE; // The form has been submitted and everything is ok so far… $name = htmlspecialchars($_POST['name'], ENT_QUOTES); $email = …

Member Avatar for cereal
0
401
Member Avatar for blueguy777

i've two files one is send-data.php which contains html form and another one is receive-data.php, i am converting the form value as session value into second file and printing using echo. but it's not printing the output. //send-data.php <?php session_start(); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html …

Member Avatar for blueguy777
0
732
Member Avatar for chaze

Here is the page: <?php include( "mypath.php" ); include( "{$filepath}/config/clientdbconnect.php" ); if ( ------------------------- ) { #exit( "Security Violation" ); } include( "header.php" ); $sqle = "select * from helpconfig where cid = '1'"; if ( !( $resulte = mysql_query( $sqle ) ) ) { exit( mysql_error( ) ); } …

Member Avatar for Taywin
0
246
Member Avatar for nadiam

hello. im not sure if this is the right forum because it is about php echo AND js but since it is about echoing i thought this forum will be better. sorry if i asked in the wrong forum. Anyway, so i want to know if echoing a js script …

Member Avatar for DJBirdi
0
9K
Member Avatar for david.roun.7_1

Ok, so here is the problem. Below is a fairly simple code that will count the number of members registered to a site. The html works just fine but the php doesn't display anything unless I do something like `if($result>0)`--- then it will display everything to the right of the …

Member Avatar for david.roun.7_1
0
1K
Member Avatar for Kniggles

hi I am having trouble on echoing a sum from a table, The mysqul works and give me the wantted result and looks like SELECT sum(brick) FROM `goodship` this is the code i am trying to get to show it on the site, <html> <head> <?php $con=mysqli_connect("hostwiththemost.com","bulderbob","superscreatpassword","shipstable"); if (mysqli_connect_errno()) { …

Member Avatar for kgavhane12
0
224
Member Avatar for wkwasniak

Hi. I just wonder, is it possible, to validateform , which has been "echoed" in PHP using JavaScript function? See code below <?php if(isset($_SESSION['email'])){ echo"You are looged in as ".$_SESSION['email']. "</br> "; echo' <form action="confirmlogout.php" id"logoutform" method="post"> <input type="submit"id="sub" name="sub" onclick="" value = "LOG OUT" /> </form></br>'; } else{ echo …

Member Avatar for wkwasniak
0
330
Member Avatar for theashman88

By examining the first, third and last (seventh) fields of the /etc/passwd file, determine the userid and login shell for your username, the user root, and the user nobody (yes, there is a system user with the username "nobody"). Create simple files in your home directory, called my.uid, my.shell, root.uid, …

Member Avatar for rch1231
0
284
Member Avatar for kuldeepsheoran

<?php $a=""; $b=""; $c=""; if(isset($_GET["plus"])) { $a=$_GET['eknum']; $b=$_GET['donum']; $c=$a+$b; } ?> <form action="index.php" method="GET"> <input type="text" name="eknum" value=" <?php echo "$a"; ?> " /> <br> <input type="text" name="donum" value=" <?php echo $b; ?> " /> <br> <input type="text" name="execute" value=" <?php echo $c; ?> " /> <input type="submit" value="sum" name="plus"> …

Member Avatar for pritaeas
0
2K
Member Avatar for Cristianh21

Hi, i'm trying to select two values from my database. $nc ='North Carolina'; $t ='Hello'; $q = 'SELECT COUNT(state, title) AS c FROM all WHERE state = "' . mysql_real_escape_string($nc) . '" AND title = "' . mysql_real_escape_string($t) . '"'; $rq = mysql_query($q); $fetch = mysql_fetch_assoc($rq); $count = $fetch['c']; echo …

Member Avatar for The Diamonds
0
277
Member Avatar for Cristianh21

Hello, I'm having a problem with my code. It seem to only echo out the picture name from my database and not the picture. This is my code search.php $result = mysql_query("SELECT * FROM all WHERE (`title` LIKE '%".$query."%') OR (`add_type` LIKE '%".$query."%')") or die(mysql_error()); if(mysql_num_rows($result) > 0) { while($results …

Member Avatar for broj1
0
279
Member Avatar for nadiam

this is my php code for my profile.php. it is to display the users name after login. <?php session_start(); require "connect.php"; if($_SESSION['name']) { $name = $_SESSION['name']; $query = mysql_query("SELECT name FROM register WHERE name ='$name'"); $numrows = mysql_num_rows($query); if(1 == $numrows) { while ($rows = mysql_fetch_assoc($query)) { echo "Welcome, ".$rows['name']."!"; …

Member Avatar for nadiam
0
291
Member Avatar for nadiam

so i wanna echo a result from my database and i have successfully done that but im trying to place the result at a specific place on my page. this is the code if($result) { { echo "<div class='total'>"; echo "<b>Your Total Income is $total</b>"; echo "</div>"; } } and …

Member Avatar for nadiam
0
392
Member Avatar for Dane2259

I'm just trying to echo a string to the browswer with the following code: <!DOCTYPE html> <html> <body> <h1>Hello World!</h1> <?php echo "My first PHP script!"; ?> </body> </html> but it doesn't show up in the browswer. The "Hello world!" header shows up but not the php statement. I know …

Member Avatar for broj1
0
320
Member Avatar for actolearn

Example 1 below works: echo "<p><h2>".$results['title']."</h2>".$results['shortdesc']."</p>"; I need to make the title linkable to the page url. I'm probably putting the ' and " in the wrong places for the link part. Example 2 - I've added the url code but does not work: echo "<p><h2><a href=http://www.example.com/".$results['url'].".$results['title']."</a>"</h2>".$results['shortdesc']."</p>"; Any help would …

Member Avatar for actolearn
0
224
Member Avatar for andreiviziru

so i have xampp installed on windows the address is localhost and i have a page test.php to preview my code a couple days ago everything worked fine when echoing <?php echo '<'.htmlentities('?php if ($_SESSION['Username']=='nume') { echo 'right name'; } else { echo 'wrong name'; } ?').'>'; ?> and when …

Member Avatar for andreiviziru
0
232
Member Avatar for shrikanthnk

Greetings friends. Please help me to understand this issue. 1 echo"<tr><td>< a href=\"home.php?num=$num\">$num</a></td><tr> 2 echo"<tr><td>$num</td></tr>"; Basically i wanted to have link for variable $num. I couldn't proceed because of following issue. However second command worked fine for me. issue : first echo returns below mentioned output. < a href="home.php?num=23434">23434 second …

Member Avatar for shrikanthnk
0
536
Member Avatar for erkanay

<!DOCTYPE HTML> <html> <head> </head> <body> <form action="2.php" method="post"> <table width="400" border="0"> <tr> <td>Ders sayisi :</td> <td><input type="text" name="sayi" /></td> </tr> <tr> <td><input type="submit" name="gonder" value="Gonder" /></td> </tr> </table> </form> <?php if(isset($_POST['gonder'])) { for($i=1;$i<=$_POST['sayi'];$i++) { echo "$i.ders"." "."<input type='text' **name='e$i'** />"." - "." <select name='dersler'><option **value='a1'**>A1</option> <option **value='a2'**>A2</option><option **value='b1'**>B1</option> <option …

Member Avatar for diafol
0
279
Member Avatar for thearts.beach

`$data= "echo * from table1 where id=$_post[ID] "` can anyone see why this line duz not compute please ?

Member Avatar for thearts.beach
0
591
Member Avatar for rom.

Hi there, I need a simple socket server which will echo a client message to all connected clients. I've found this easy py script below, but it only echos the string to the client that sent the message. Any way to mod this so that it will send the message …

Member Avatar for silver.moon.37819
0
2K
Member Avatar for fheppell

I've got a mysql query that should return a single cell SELECT `download` FROM `images` WHERE `owner_un`='$owner' AND `url`='$url' How would I echo the result of this? Thanks for any help

Member Avatar for minitauros
0
233
Member Avatar for rubai

I have a problem want to be solved. I have three pages. page1.php, page2.php page1.php has a form with two text field. one text field is for name and another is for number. there is a submit button and a "next" button too. using session I want show given name …

Member Avatar for diafol
0
2K
Member Avatar for while(!success)

Hey guys, I am trying to dynamically parametize my url, but it gets lost and I have no idea why. Perhaps some insight from you guys will help. Here's the code: while($row = mysql_fetch_assoc($getID)) { echo "<tr>"; echo "<td><a href='View.php?id='" . $row['ID'] . "'>" . $row['ID'] . "</a>" . "<br …

Member Avatar for while(!success)
0
402
Member Avatar for luke.belleghem

I have a business directory website that users can create listings in. I already have the listing functionality mostly working. An example of the code i use is this: <div id="companyName"> <?php echo $row_getListing['company_name']; ?></div> What I want is a code like this to get an image from the logo …

Member Avatar for Webville312
0
1K

The End.