Note that there are some explanatory texts on larger screens.

plurals
  1. POHREF="" automatically adds to current page URL (in PHP). Can't figure it out
    primarykey
    data
    text
    <p>Longtime reader of stackoverflow but first question.</p> <p>I'm working with Wordpress (specifically thesis theme) in the custom_functions.php file and am finding for some reason is automatically adding the current page url. For example this code is to query the database and then loop through outputting each product in it's own div:</p> <pre><code>$result = db_connection($query); while ($row = mysql_fetch_array($result)) { ?&gt; &lt;div class="box"&gt;&lt;a href=""&gt; &lt;img src="http://www.electricbikehub.co.nz&lt;?php echo $row['product_root_directory'] . $row['mid_size_image'] ?&gt;"&gt; &lt;h2&gt;&lt;?php echo $row['name']?&gt;&lt;/h2&gt; &lt;p&gt;&lt;?php echo $row['description_brief'];?&gt;&lt;/p&gt; &lt;p&gt;&lt;span class="multiple_product_red"&gt;&lt;span class="multiple_product_linethrough"&gt;RRP: &lt;?php echo $row['list_price']; ?&gt;.&lt;/span&gt; Our discounted price: &lt;?php echo $row['our_price']; ?&gt;. Includes delivery and GST.&lt;/span&gt;&lt;/p&gt; &lt;/a&gt; &lt;/div&gt; &lt;?php } ?&gt; </code></pre> <p>As you can see 3rd line says href="" but the actual link being generated is the current page (in this case '<a href="http://www.electricbikehub.co.nz/?page_id=1192" rel="noreferrer">http://www.electricbikehub.co.nz/?page_id=1192</a>'). If I add anything in the href, such as href="something" it will just add it to the end, ie <a href="http://www.electricbikehub.co.nz/?page_id=1192something" rel="noreferrer">http://www.electricbikehub.co.nz/?page_id=1192something</a>.</p> <p>Any help would be greatly appreciated!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload