Hello,
I recently updated to php 7.0 and one of my scripts that was previously working fine, now no longer works. At first the problem was obsolete code, which I have sense corrected.
However, now the script simply doesn’t actually return anything how it is suppose to.
The point of this script is to automatically pull content from a post elsewhere on my forums and post it in a reply to a new topic created after a form is submitted. The Automation works perfectly until I look at the post and see that it is blank I can’t figure out how to get the content to actually show even though the following code looks like it should be working
[php]// This works by pulling up the content of the first post of the topic you designate by ID number.
// To find a topic’s ID, look at the topic’s URL, it’s a five or six digit number
// Replace the number below with your topic number
$topic_number = “25085”;
$myvar = “”;
$query = “SELECT * FROM ipbforums_topics WHERE topic_id=’$topic_number’”;
$show_results = mysqli_query($link, $query);
while($row = mysqli_fetch_array($show_results)){
$topic_id = $row[‘pid’];
$myvar = $topic_id;
}
$query2 = “SELECT * FROM ipbforums_posts WHERE pid=’$myvar’”;
$show_results2 = mysqli_query($link, $query2);
while($row = mysqli_fetch_array($show_results2)){
$topic_post = $row[‘post’];
$myvar = $topic_post;
}
ini_set(‘mbstring.substitute_character’, “none”);
$myvar= mb_convert_encoding($myvar, ‘utf8mb4’);
return “$myvar”;[/php]