Jump to content

Php not reading text input See more: PHP Expand ▼


egemen

Recommended Posts

Php not reading text input

See more: 

PHP

Expand    Copy Code

index.php switch ($_GET["page"]) { case 'anasayfa': include("k.php");
break;
default: include_once("k.php"); 
} k.php include "baglan.php";
echo '<div class="fd">';
  if (isset($_POST["ara"])) { } else { $sql = 'SELECT kimg,ad,yazar,yv,ft,id FROM kid '; 
  $qe = $conn->query($sql);
  if ($qe->num_rows) { } else { echo "başarısız";
  } if (mysqli_num_rows($qe)) { while ($a = mysqli_fetch_array($qe, MYSQLI_ASSOC)) { if (isset($a) && isset($a["kimg"]) && isset($a["yazar"])) { # code... @print(' <div class="cvv">'); echo ' <a href="kitab= ' . $a["id"] . '>'; echo "<img src= 'img/logo.png' class='img'></img>"



What I have tried:


Copy Code

The k.php file does not read the paragraph texts I wrote in my inkude tag

 

Link to comment
Share on other sites

Ok - reformatting your code to make it READABLE I see:

//index.php
switch ($_GET["page"]) 
{ 
	case 'anasayfa': 
		include("k.php");
		break;
	default: 
		include_once("k.php"); 
} 
//k.php 
include "baglan.php";
echo '<div class="fd">';
if (isset($_POST["ara"])) 
{ 
} 
else 
{ 
	$sql = 'SELECT kimg,ad,yazar,yv,ft,id FROM kid '; 
	$qe = $conn->query($sql);
	if ($qe->num_rows) 
	{ } 
	else 
	{ 
	echo "başarısız";
	} 
	if (mysqli_num_rows($qe)) 
	{ 
		while ($a = mysqli_fetch_array($qe, MYSQLI_ASSOC)) 
		{ 
			if (isset($a) && isset($a["kimg"]) && isset($a["yazar"])) 
			{ 
				# code... @print(' <div class="cvv">'); echo ' <a href="kitab= ' . $a["id"] . '>'; echo "<img src= 'img/logo.png' class='img'></img>"

which makes no sense at all.

 

Link to comment
Share on other sites

  • 3 weeks later...

<a href="kitab= [value-1]><img src= 'img/logo.png' class='img'></img> </a><p class='p'>yazar ad:[value-3]</p><p class='p'>[value-4]</p><p class='p'>[value-5]</p><p class='p'>[value-6]</p>hhkhlk</div>  <div class=" cvv"="">  </a>    

 

 

 

it gives the above, it should give it as output roughly
<div class="cvv">
   <a href="book= ' . $a["id"] . '>

                     echo "<img src= 'img/logo.png' class='img'></img> </a>";

                   <p class='p'>author name:" . $a["name"] . </p>
                     echo "<p class='p'>" . $a["author"] . "</p>";
                     echo "<p class='p'>" . $a["yv"] . "</p>";
                     echo "<p class='p'>" . $a["ft"] . "</p>";

Link to comment
Share on other sites

Like ginerjm, I'm not sure I understand the issue / question. However, looking through the code and screenshots, I see that the href attribute in your anchor tag is missing a quote. Perhaps changing this

echo ' <a href="kitab= ' . $a["id"] . '>';

to this

echo ' <a href="kitab= ' . $a["id"] . '">';

will fix the issue. Note the double quote (") before the greater than symbol (>) at the end.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.