Jump to content
DangThao

Web View ItemID (item mall)

Recommended Posts

$id = 0;
if (isset($_GET['buy'])) { 
	$id = (int)filter_input(INPUT_GET, 'buy');	// should return 1 in your case
}

then, you can create your own function to return item data.

function GetItemData($id) {
	$con = ...; // initialize your db connection
	$query = 'SELECT name, quota, whateveryourneed FROM table WHERE id=$id';

	// execute sql query 
	$stmt->$con->prepare($query);
	$stmt->execute();
	
	return $stmt->fetchAll();
}	

In your php file you have your param (buy) and your function to gather data (GetItemData), so you use it together.

$data = GetItemData($id);

Then you pass it to your template file and display it.

if ($data) {
	echo $data['name'];
}

 

Edited by quad

Share this post


Link to post
Share on other sites
6 hours ago, DangThao said:

Hey guys! 
How to make the below
award.jpg.d6b9378d83a2112dea90627aa05037dc.jpg

TO:
when it takes you to that award&buy=1
It will be like:
detail.jpg.644b5c33c645f3b33e058ae09fa31411.jpg

If you know how, please let me know.

As you can see i've shown two pictures, seems like you don't understand. IDK what else to explain 'cause it's so simple. I want when you buy the item it takes you to award&buy=1 (which is picture one) """""""""""""BUT""""""""""""""" i want when it takes you to award&buy=1, it will be like picture 2 instead. 

Share this post


Link to post
Share on other sites
3 hours ago, DangThao said:

As you can see i've shown two pictures, seems like you don't understand. IDK what else to explain 'cause it's so simple. I want when you buy the item it takes you to award&buy=1 (which is picture one) """""""""""""BUT""""""""""""""" i want when it takes you to award&buy=1, it will be like picture 2 instead. 

You need to edit .tpl file for that


Download: Nightmare Demonic Helm

Dimension Pirates Online files: get now

New map Project: Flag PK

Black Skin 3.1.3 for pko 1: Get now

Share this post


Link to post
Share on other sites

I think it is POST query. Check for hidden input tags


Share this post


Link to post
Share on other sites

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...